Posts

Showing posts from June, 2015

php - Search a date range in a textfield -

मेरे पास एक टेक्स्ट फ़ील्ड है जिसमें MYSQL डेटाबेस में 01/01 / 2014 , 06/2014 और 2014 मैं खोजों की तरह dd / mm / aaaa , मिमी / एए या aaaa श्रेणी में। उदाहरण: 01/01/2013 से 011/01/2014 या 08/2013 से 09/2014 या 2013 से 2014 तक "पाठ"> आप अपनी क्वेरी में खंड के बीच का उपयोग कर सकते हैं फ़ील्डनाम '01 / 01/2013 'और' 011/01/2014 ' OR SELECT * से उस स्थान के फ़ील्डनाम & gt; = '01 / 01/2013 'और फील्डनाम & lt; =' 011/01/2014 '

python - User Defined Types as Dictionary Keys -

I've been struggling with the concept of hash tables and dictionaries over the last few days and could not find the right solution for my problem I hope you will forgive me for your initial (and perhaps repetitive) questions and to spend time answering me The classic GridWorld MDP problem is my "world" as part of the problem but this is not a problem here) I have made various examples of the state , each of them A unique and described tuple is (row, column) . My question is how can I handle these examples and how to reference it. To be more specific ... I have created several states with the following code, failing in many other options, such as dictionaries, sets and sample categories): where class is defined by: class state: def __init __ (self, Line, color): self.row = line self.col = col def __hash __ ): Return hash ((self.row, self.col)) def __eq__ (self, other): return (Swynko == Anykro) & amp; (Self.col == Other. Col) # __hash__ and __eq__ are...

javascript - node.js res.json messed up -

First I request an '/ init' and the response is {"x": 50} , Then I request a '/ user' and the response is {"x": 50, "data": "jack"} . There is no problem till now, but if I make an init again, then it reacts to a {"x": 50, "data": "jack"} possible? var resp.success = {"x": 50} exports.init = function (rick, ridge) {res.json (resp.success)}; Export.user = function (req, res) {user.findOne ({_ id: "1234"}) exec (function (err, user) {var response = resp.success; response.data = user.name; res Jason (reaction);}); }; Because you defined var resp.success = {"x": 50} In a scope outside @init and @user methods, when you modify / read resp.success in those ways, they are reaching a shared object instance of resp.success. You can set it independently within the @init method and define resp.success: exports.init = function (req, res) {var resp.success = {"...

angularjs - Angular bootstrap change button colors on click -

मेरे पास निम्न है & lt; बटन प्रकार = "बटन" class = "btn बीटीएन-डिफॉल्ट "एनजी-क्लिक =" शोमोअरफंक ('शैक्षणिक') "& gt; शैक्षणिक & lt; / button & gt; & Lt; बटन प्रकार = "बटन" वर्ग = "बीटीएन बीटीएन-डीफॉल्ट" एनजी-क्लिक = "शोमोरेफन्क ('प्रैक्टिसाइंस')" & gt; एप्लाइड साइंस & lt; / button & gt; जब हम + चिह्न पर क्लिक करते हैं, तो मुझे 2 बटन के साथ एक पैनल देता है I ये बटन डिफ़ॉल्ट पर सेट हैं लेकिन मुझे एक फ़ंक्शन है जो प्राइमरी जब भी क्लिक किया जाता है (सक्रिय) बटन को सेट करना चाहते हैं, और जब यह अनचेक है या डिफ़ॉल्ट पर वापस जाता है दूसरा बटन क्लिक किया जाता है मैं इस कार्यशीलता को कैसे प्राप्त करूं? बस एनजी- & lt; बटन प्रकार = "बटन" एनजी-वर्ग = "{'बीटीएन-प्राथमिक': डिस्प्ले। अकादमिक} "एनजी-क्लिक =" शोमोरेफंक ('शैक्षिक') "& gt; शैक्षणिक & lt; / button & gt; & Lt; बटन प्रकार = "बटन" ए...

php - Strange pagination behavior giving white page -

I am using points on wordpress page I have used this code on my other pages and it is working fine there, but on the "schedule" on this page, when I try to link the next page of Goto it gives a white page. I reset the permalink setting because I found the only solution on the Internet, there is still no such problem. In the database, there are 9 records in this custom post type, so the page number will be 3 pages. Pagination on the page & lt ;? Php $ paged = (get_query_var ('page'))? Get_query_var ('page'): 1; $ Args = array ('post_type' = & gt; 'schedules', 'posts_per_page' => 3, 'post_status' = & gt; 'publish', 'paged' = & gt; $ paged); query_posts ($ args); If (is_pause ()): while (is_pause ()): the_post (); $ Schedules_vessel = get_field ('schedules_vessel'); $ Schedules_voyage = get_field ('schedule_wies'); $ Schedules_port = get_field ('schedules_port...

vba - Export CSV file from Access without double quotes -

I am trying to export the last 2 table as a CSV file from Access 2010. The quotation mark is generated in the CSV file. How do I remove quotes from CSV file? I tried to use the import export text macro, the VBA code for the macro looks below: function output_to_com_maka () Getout on output_to_ csv_macro_Err DoCmd.OpenQuery "ABC ", ACV, Normal, Acidate DoCMD. OpenTable "Final 2", ACV, Normal, ACIDD, DOCMD. Transfer Text ACXportDelim, "", "Final 2", "C: \ Users \ Output File CSV", True, "" DoCmd.Close acTable, "Final2" Output_to_csv_macro_Exit: Exit Function Output_to_csv_macro_Err: MsgBox Error $ Resume Output_to_csv_macro_Exit End DoCmd.TransferText will always put quotation marks in place without an export specification. itemprop = "text" If you want to do without it, you must first set up an export specification, then reference that specification in your code.

linux - mv wrapped inside an if in shell scripting -

How do you do this? What am I thinking like this .. also, do I need to work and work? Or just one of them if [MV 1.txt & gt; 2.txt == '0'] then resonate "success" and then resonate "failure" will be enough in the bus: mv 1.txt 2.txt & amp; Amp; Echo "success" || If you want to use traditional if / fi> If using mv 1.txt 2, then echo "failure" .txt then echo "success" and "failure" to echo

python - How would you evenly distribute a list of sublists that each have a numerical value across three lists? -

How would you distribute the list of books that have the value of each? I would like to distribute the following list in 3 lists. lst = [['a', 10], ['b', 40], ['', '10'], ['d', 30], ['e' Since the sum of all values ​​is 304, there are three lists: ['f', 100], ['g', 90], ['h', 4]] Should be approximately 101.3 The result of this is that I want to produce in some form. ['A', 10]] lst2 = [['F', 100], ['H', 4]] lst3 = [['G', 90] [['B', 40], ['C' , 10], ['D', 30], ['E', 20]] This is my solution yet it shows, but to make it fast Work is needed. Def Lists (lst): lst = map (Lambda Subby: Subly [1], LCT) Return amount (LST) DEF Destination (LST): Reach the bucket until you reach #, then For the next bucket go ahead Lst1 = [] Lst2 = [] Lst3 = [] For Suble lst: try: if ListSum (Lst1) & lt; 100: Lst1.append (Subly) Eleph Listings (Lst2) & ...

SQL Server 2012 LIKE expression pattern -

I am working on an assignment for which I add an obstacle which ensures that all the values ​​in the column are fully Are numerical. Starting from Im Alternate table table_name ADD CONSTRAINT ck_name check (col_name such as 'pattern'); The problem is that prices can vary in length, I am studying a lot but I can not understand a pattern that will limit it to numbers but still it is different in length I know in MySQL that you can do '[0- 9] *', but it does not work on SQL Server. Can someone point me in the direction of the equivalent or confirm that this is not possible / I misunderstood it? EDIT: I have to use an obstacle as per the need of assignment. you can do something like ALTER TABLE table_name ADD CONSTRAINT Ck_name CHECK (isGLEERIC (col_name)) & lt; & Gt; 0); (or something like) Add an optional table table_name; insert ck_name check (not call_name like '% [^ 0-9]%');

sublimetext - How to record macro to record find command -

I use ctrl + q to start macro recordings in subtitle text. I can record a macro for copy / paste commands, however I can not record it for order to find it. I have already used Command + G to find a text in the clipboard How can I record a search order. Affaq, there is still recording macros to search / replace. You may however want to take a look at the package.

javascript - d3.js and geojson map throws error -

I am trying to create a map with d3.js and geojson which contains data about Denmark. I have now searched for hours to find my problem: My code: The console shows: the data is zero for .data (data.features) I I can In the code on your website (not in the code you posted here), callback is incorrectly rounded on callback to d3.json (p) Instead of {...}); as they should be.

Does array notation in Cilk run in parallel? -

i.e. int a [100] a [:] = 1; Does it try to make a 100 threads? Or what to do for a loop? I thought it was parallel, but I just tested it and it did not look like that. Is there any way to use multiple threads or is array signaling, notation? no Silk Plus supports two types of similarity; Data Equality and Work Equality Data equality simultaneously operates on multiple values ​​simultaneously. It is sometimes referred to as symode - single instruction, multiple data A "sign" for array signaling compiler is that it is a data parallel operation and should be done using CPU's vector units. When there are more elements than fit in the vector unit, then the compiler will generate a loop around the operation. If the compiler can detect that many lines are working on the same set of data, then it will keep the loop around the whole calculation. Work equality brings many functions together, where each task is executing its own flow instructions. If you want ...

css - Can't shorten the height of this li tag -

Image
Although it seems like simple CSS, I do not see the height of li P> I have a Attempted to add line-height , height , make sure that padding and margins are 0 ... there is no dice yet what is the location above and below the text is? This is not a a tag inside a Can someone help me? two line-height settings in your CSS which you must keep in mind : 1) style.css (line 251) # primary-menuUl {line-height: 33px; } 2) style.css (line 204) # primary-menuUl one {font: bold 12px / 33px 'merivideo', serif; }

Lucene Query Syntax of field with a space -

I am trying to do two Lusen questions. My first query looks like this: Level: "dangerous" My second query looks like this: IP address: "11.22.333.444" I can not find a query error, however, I know that with matching IP address There are documents. For this reason, I suspect that the location between "IP" and "address" is causing the problem. However, if I am not an expert in Lucene, then I am not sure I am right in that. When I look at my results set using the postman, I can see a document with a field that looks like this: "IP Address ":" 11.22.333.444 " Can anyone tell me that my query is correct? Or, if I'm missing something? Thank you! Yes, this location is a problem. The location of the field name is acceptable, but conflict with query parser syntax. Address: "11.22.333.444" You can avoid location by using a slash before the location, such as : IP address: "11.22....

sql - MYSQL database server Optimize: Queries very slow with many connections -

I am running a MySQL DB server during load testing, with thousands of connections, MySQL queries are taking minutes in minutes . What can I do to optimize this situation? My short description of mysql DB configuration is here Read only access to tables. Using the IODB engine Mysqltuner has run, and its recommendation is implemented The system is under a lot of queries and possibly has half open connections There are also. File System Optimization. I know that this is a very open ended question, but like any input. Edit: Adding more information: The questions are very simple, like "Choose from q6 * * to choose where created_it = '2013-10-02 + 00: 00: 00'". Questions will always be always of this form. Many people like them in the table like schema (one of the six huge tables): Create table q4t_table (created_at TIMESTAMP, tweet TEXT) engine = InnoDB; The tables are indexed on timestamps (or user hosted in some tables that are int). Once, out o...

c++ - How do I compile gnu libstdc++.a with PIC? -

I am trying to compile a shared library for those systems that do not have any libstdc ++ Is enough to run, which means I need a static link libstdc ++ in the library. I am trying to link directly to LIBSTDC ++. ( -Wl, -Bastatic -L / path / to / lib64 -lstdc ++ ), but I think my LibStDC ++ A PIC was not connected to: / usr / bin / ld: lib64 / libstdc ++. A (compatibility.o): for transfer __cxxabiv1 `against typeinfo R_X86_64_32 :: __ compulsion_translation 'can not be used during the making of shared object; -fPIC recompiled with lib64 / libstdc ++: A: The symbol could not be read: bad value I tried to recompiling CFLAG = with GCC = "- FPIC" and CFFLAS = "- FPIC", but not The idea is to pass Side-pic option to configure . GCC Builds is a very complex animal with many stages, so just one CFLAGS variable can not work as intended.

soap - Getting Logos from Sites with SiteInfo -

We are trying to get the site logo from Yodlee API. From the SiteInfo data model (using the SOAP API), the following methods are available to retrieve the site logo siteInfo.getDefaultSiteLogo () siteInfo. GetLocalizedSiteLogos () getDefaultFavIcon () The problem is that the sites we are using (all sites with AU geography) are returning null I am pretty sure that this is possible, because Yodli's logo for your fastlink sites shows, as you keep adding them Are. Here is the method call sign I am using soap API via Java (like the sample code, using XIS 1.4 ) And the API signatures are as follows: SiteAccountManagementService is getAllSiteAccounts of this method that has the following signature Com.yodlee.soap.collections.core.accountmanagement.ArrayOfSiteAccountInfo getAllSiteAccounts (com.yodlee.soapp.common UserContext userContext) . Then there is also getCctx, in which the following signature public com. Audley .. Com.common.CobRandContext getCctx ...

Java offset encoding -

Write a program that moves in a string and integer offset. In this program, we want to denote the string by increasing each character from the offset integer in alphabetical order. So if the integer offset is T1, then BC becomes Mn, Mn gets, and z becomes. I will not write the program for you, but here are some helpful hints for receiving ball rolling. Went to: Look at the data type char and wrapper class characters . In ASCII Try to use java.lang.String method toCharArray () to break the input code. Array of letters After the array of letters based on your ASCII knowledge, decide how to increase / decrease each character from the specified value to get the result. Check for the cases of the edge ( 'z' becomes 'a' , etc.) and letters [] Array for an string I know if this does not make any sense, hopefully this answer will allow you to understand and learn more complex aspects of Java , While writing and implementing your code at the ...

zsh - Expand aliases in non-interactive shells -

में bash , हम विस्तार करने के लिए shopt -s expand_aliases का उपयोग कर सकते हैं स्क्रिप्ट्स में उपनाम। zsh , csh , और tcsh के लिए बराबर कमांड क्या हैं? क्या वे भी अस्तित्व में हैं? zsh पर मेरे प्रयासों को ध्यान में रखते हुए, मैंने इस तरह की कमान पाया है मैंने फाइल को स्क्रिप्ट के अंदर एलियंस के साथ सोर्सिंग करने की कोशिश भी की, लेकिन यह काम नहीं करती। कोड> zsh आप setopt aliases #! / Usr / bin / zsh उपनाम हू = "इको बार" अनस्टॉपटी एलियास हू # outputs का उपयोग कर सकते हैं ` ./test.zsh: कमांड नहीं मिला: हू सेटोप्ट एलियास हू # आउटपुट्स `बार` विस्तार के लिए मैन ज़ॉक्शचेशन देखें। csh और tcsh के लिए, फ़ाइलों को सोर्सिंग ( source $ {HOME} /। Cshrc , उदाहरण के लिए) suffices।

java - Linked List insert method -

In the process of writing a class that represents a linked list and I can not find the result I have written a class in which An internal node class and an insert method include adding a name and score to the list, removing the person with at least scores and limiting the list of ten. I have also created a test GUI program, when I participated and type the command, then the name of my class (gamerlist) is displayed after the number and "@" instead of the name and number in the list. I suspect that my problem is somewhere in my putting method. Any feedback would be greatly appreciated. linked list class class GameList {// node class private class node {String name; Int Score; Next node; // node constructor node (string name val, int scroll, node n) {name = nameVal; Score = Scrroll; Next = n; } // constructor node (string name val, int scroll) {it (name val, scrVal, null); }} Private node first; // head private node last; // Last element in the list // Constructor Publ...

Can I still release a product with iText 2.1.5? -

I can not find any links related to SourceForge from 2.1.5. I wonder if I can still use this version as a third party component in my product. Any comment will be appreciated! Of course, you can search the web and you will find that version easily (e.g. Or) this is a different question, although you should still use that version. It is very old and many bugs have been fixed and new functionality has also been added. Then do the following: Check license restrictions (LGPL vs AGPLL) If you do not have any problem with a GPL-based license then use the latest 5. X version If you can not buy commercial licenses using APGL or at least use version 2.1.7 If you go route 2.1.7 then some Trial - In many cases it still works fine. If not, you have to fix it yourself

file - C++ - How to get the desktop path OF A SPECIFIC USER -

I'm looking for a way to get the specific user's desktop path in C ++. I went to it, and got a heap of towers, but all of them (using SHGTFlinderpath) give me the current user's desktop path. Besides, I could get a list of users with NetUuserum, besides, it would be great if it works on Windows 2000 / XP, but it is not necessary. Thanks;) #include & lt; Shlobj.h & gt; # Include & lt; Stdio.h & gt; int main () {four paths [MAX_PATH]; SHGetFolderPath (zero, CSIDL_DESKTOP, zero, SHGFP_TYPE_CURRENT, path); printf (path); Return 0; } You can retrieve the current user path through the system environment constant RUN - & gt; CMD - & gt; Type "Set up apadata" - CMD reverbs the path of data data folder, so you can split this string by "\" and the user can get the path I think the easiest way to do this That is, call CMD in the C ++ and pass the "set apadata" as the parameter and get the output - then whatever you ...

regex - use awk to search for match and rename -

I am trying to figure out the solution and hope that someone can help you. I have two files ... There is a long list of unique string coding for some sample sequence (one column) in file 1. File2 has many records and many columns, but here the record organizes unique strings that match the sample views. I want to find a unique string of AWK file 1, in file 2, and want to rename the unique string in file 1, in which the string found in 1 dollar of that file where the unique string was found. File 1 id1 id2 id3 id4 id5 id6 id7 id8 id9 id10 Id2, id2, id33, id35 My actual file 1 $ 1 is approximately 17,000 records in the desired file and approximately 4,000 in file 2. Output id1 id2 id3 id4 id5 id6 id5 id5 id1 id10 Any help with the record, 1-400 field appreciated is! Here's a different way to awk. Enter the following executable in the awk file: #! / Usr / bin / awk -f FNR == NR {F1 [$ 0] = NR; Out [NR] = $ 0; Cnt = nr; {F1_line_num = f1 [f2_line [fld]]...

c++ - Extract template type from initializer list -

I have a problem with C ++ 11 templated code. I have a template function Template & lt; Typename T & gt; F (const std :: vector & lt; T & gt; & amp; v) {/ * do something here;} When I call f (v) , where v is std :: vector & lt; some_type & gt; V; , the program is just fine. However, if I give an initial list on f then say f ({a, b, c}), where a , b , c are all of the same type, say some_type , I get a compilation error: template logic 't' / code>, therefore For example, f f . Int & gt; ({A, b, c}); aggregates when a , b and c all int s are any standard initializer list There is no way to specify the template type T from the std :: vector & lt; T & gt; is defined as taking the parameters? Actually I just want to be able to call f ({initializer_list}); f without specifying the type of elements of initializer_list . You can just define template To work for this, initializer_list should ...

mysql - PHP Display Button if Certain Value is So and So -

I am currently programming a PHP application, and I am wondering if it is possible only for a link If a certain database variable is so and so much. For example, PHP has been tested, if the currently logged in user's value is "admin" below the "rank" variable in the table, and if it is, display the link. If not, do not show anything. Many thanks, and if someone is confused, then I am ready to give more information. The cool thing about PHP is that you can use HTML & amp; Both the PHP code and your answer here are: & lt ?? Php if ('databasefield' === 'value to compare') {? & Gt; HTML LINK TAG & lt ;? Php}? & Gt; Use === instead of === Because you want to match your session value with the database value and also in the case of login. Therefore, for security purposes use === It will check the value type along with both the variables. Feel free to ask about any doubts here.

c++ - Allocating (malloc) a double** in cuda __device__ function -

It seems that a lot about moving the 2D arrays from the host to double (or int, or float, etc.) The questions are in the machine. This is not my question. I have already taken all the data to the GPU and, __ global __ kernel call many __ devices___ function. In these device corners, I have tried the following: To assign: __i device__ double ** matrix create (int Rows, int colals, double initial values) {double ** temporary; Floating = (double **) malloc (rows * sizeof (double *)); (Int j = 0; j and lt; rows; j ++) {temp [j] = (double *) malloc (column * size (double));} // Set for initial values ​​(int i = 0 ; i & lt; rows; I ++) {for (int j = 0; j & lt; cols; j ++) {temp [i] [j] = initialValue; }} Return temporary; } __ device__ zero matrix desty (double ** temporary, interval lines) {for (int j = 0; j & lt; rows; j ++) {Free (Temporary [j]); } Free (temp); } The __ device __ for single dimension arrays is great, it can not seem to keep it stabl...

C++ weird compilation error on removing a variable -

निम्न कोड g ++ 4.8.1 नहीं करता है स्ट्रक्चर लेयर {typedef struct विजेट} {} विजेट; आभासी शून्य मज़ा (शून्य) {struct विजेट w; } विजेट्स w, x, y, z; }; हालांकि, अगर मैं सिर्फ widgets w, x, y का उपयोग करता हूं; // इसे हटायें चर यह क्यों हो रहा है? यह जीसीसी में एक बग है रेफरी: - जी ++ निम्न कोड को अस्वीकार करता है: वर्ग फ़ू {bool a, b, c, d; typedef संरचना बार {} बार; आभासी शून्य foo (शून्य) {struct बार बार; }}; example.cc: सदस्य फ़ंक्शन में "आभासी शून्य foo :: foo () एक उदाहरण: example.cc:6: त्रुटि: typedef-name â ???? Foo :: Barâ ??? ? के बाद एक ???? Example.cc:4: त्रुटि: एक फू :: बार यहां एक पिछले घोषणा है उदाहरण example.cc:6: त्रुटि: '';; ??? '' से पहले घोषणा में अमान्य प्रकार टोकन लेकिन ऐसे कई उदाहरणों को स्वीकार करता है, जिनमें निम्न शामिल हैं: वर्ग फ़ू {bool a, b, c; Typedef संरचना बार {} बार; आभासी शून्य foo (शून्य) {struct बार बार; }}; यह व्यवहार x86_64-redhat-linux (4.1.2 और 4.4.0) और i386-pc-solaris2.11 (4.2.4, 4.3.4...

rss - Why feedparser for Python does not see all elements in the feed -

I use the following code: import feedparser as FP If __name__ == '__main__': Url = 'http://www.careerbuilder.de/RTQ/rss20.aspx?rssid=RSS_PD&num=25&geoip=false&ddcompany=false&ddtitle=false&cat=JN038 To enter 'd = fp.parse (URL): Print entry print' ---------------------- ' One result, I found: {'guidislink': 0, 'published': U'Wed, 23 April 2014 04:00:00 Z, 'published_parts': Time.struct_time (tm_year = 2014, tm_mon = 4, tm_mday = 23, tm_hour = 4, tm_min = 0, tm_sec = 0, tm_wday = 2, tm_y Day = 113, tm_isdst = 0), 'title': u'bankkaufmann (m / w) '} - ---------------------' Gidicilak ': 0, 'Publish': U 'Wade, 23 April 2014 04:00:00 Z,' published_parced ': Time.struct_time (tm_year = 2014, tm_mon = 4, tm_mday = 23, tm_hour = 4, tm_min = 0, tm_sec = 0, tm_wday = 2, tm_yday = 113, tm_isdst = 0), 'title': u'Anlagenbuchhalter (m / w) '} --------------...

Zurb Foundation - Images with rounded corners -

I have recently started using the Foundation (V5), maybe I'm missing something in the documentation But I do not think there are .radius and .round class squares to know how to apply the spherical corners for images, I have given them an IMG tag (original parent Also) and it does not work. There is a class ready for bootstrap, maybe we have to code ourselves in the Foundation, but I hate some code which is already present by default. is the foundation's global $ radius (3px), which applies to its many classes ( Such as thumbnails), but there is no IMG-round in it ... like Twitter bootstrap. You will need to do this yourself [boundary-radius] (or your own variable if you are using a sauce).

java - how the size of jpanel components in a specific layout can be set? -

I am making a beginning and I want to design a GUI of Windows Calculator in Java. I have set some granutout with some pockets in each I set the size of such buttons: jButton [i] .setPreferredSize (new dimension (42, 42 )); But the differen jpanels buttons do not have the same size. What should I do? pocket [i] .setPreferredSize (new dimension (42, 42)); There are 3 easy ways to maximize the button. Use a large sign for the button Use a large font for the button ( Preferably through a PLF) Set a large margin around text and icons. To set the preferred size, look (yes.) If you still intend to go that route, consult @trashgod and Override Choose the preferred size instead

c# - Error 404 from Google Search API -

I am getting a 404 error with the code given below, I am running Visual C # Express 2010. The string portion of the string is: q% 3dAction% 2bMotivation% 2c% 2bInc.% 2bSouth% 2bSan% 2bFrancisco% 2b% 26alt% 3djson% 26start% 3d0% 26num% 3d10 " string search string = "https://www.googleapis.com/customsearch/v1%3fkey%3d {APIkey}% 26cx% 3d {cxkey} % 26q% 3dAction% 2bMotivation% 2c% 2bInc.% 2bSouth% 2bSan% 2bFrancisco% 2b% 26alt% 3djson% 26start% 3d0% 26num% 3d10 "; WebRequest myRequest = WebRequest.Create (search string); http webpressation myResponse = ( HttpWebResponse) myRequest.GetResponse (); You're running too much again You just want to avoid the query value A - Key / Value is not a pair separator, so the URL should be something like this: string url = string.Format ("https: //www.googleapis.com/customsearch/v1?key= {0} & amp; cx = {1} & amp; q = {2} ", HttpUtility.UrlEncode (APK), HTTPProduct.URLNcode (CXK), HTTPPtylty Urlco...

angularjs - fixing loader ajax to show only for router -

A sub page is loading inside the ng-view, so I want to show an AJAX indicator. I just want to show it to the router but the code snippet below is showing the AJAX indicator for all AJAX requests, how to fix it? directive ('loading', ['$ http', function ($ Http)) {return {restrict: 'a', link: function (scope, elm, ethers) {debugger; Scope.Iso loading = function () {debugger; return $ http.pendingRequests.length & gt; 0;} area $ watch (scope.is loading, function (v) {debugger; if (v) {elm.show ( );} else {elm.hide ();}}}}}}}}]); Usage & lt; div class = "ajax-ngview" data loading & gt; & Lt; / Div & gt; & Lt; Div ng-view & gt; & Lt; / Div & gt; I'm seeing something like this $ routeProvider. When this URL is being loaded ('/', {templateUrl: '/ MCT / home / home', / /} a special AJAX activity GIF controller: function ($ scope) {$ scope.setActiveMenuMod ('mct-mod ');}}) ...

Compilling C code in Linux terminal -

I am using Linux Mint 16. I had a code that I change a bit. I use two lower commands in the terminal to run the code. The problem is that it does not give me any errors, but the changes are not implemented, which means that it runs the previous version of the code. gcc -std = c99 -cCode.c -o P> GCC -STD = C99-C Codecau-o code.o will insert the compiled object file in Code.o , not ./ code as you expect it to be .. In addition, do not run the linker indicating -c , so effectively you end up with an object file that can not be run. GCC -STD = CAMT code code -O code will produce what you need. For the complete list of GCC use either flag man gcc or

sql - Foreign Key creation in Oracle -

This question is already an answer here 1 answer Tried to create and primary key My code is correct Table1 Create table (P_Id not the original primary key, LastName varchar ( 255) No NULL, FirstName Varkar (255), Address Worker (255), City Worker (255)); Table 2 : create table order (O_Id integer no NULL primary key, OrderNo integer (10), integer foreign P_Id principal reference person (P_ID)); Error: -ORA-00907: missing right bracket Do not know what the error is. foreign key keyword: table Create an order (O_Id not the original primary key, not the order int (10), P_Id int reference persons (P_Id)); Btw: When you also use an inline definition, the column name list is not needed P_Id integer reference people will suffice . This will hamper the name of a system (such as SYS_C0066866 ), then it is generally better to use a format where you can specify the name of the obstacle: prefixing the order of the order (O_Id integer no NULL pri...

android - Can I submit the same APK with different package name and display name to Google Play? -

I opened a Google Play developer account 4 days ago and submitted my first app. It has been more than 60 hours since the submission; The app is not found anywhere in Google Play, neither in search results; Nor directly on the link. () I have opened a ticket for support and resubmitted my APK. (Uploaded for production, not beta or alpha) Now I wonder if it is ok to submit the same APK with different package names and it's OK to display the name to Google Play. I just want to see it through this medium. I will unpublish the second, when one of them actually goes to the market However, I do not know whether it is against TOS or something, obviously, I do not want to be blocked / restricted from the market. I know it's complicated; But as an inexperienced developer; I need all the help. Thanks in advance. According to the GooglePlay guidelines, You can not upload .apk without changing code> version code . When you upload a .apk to GooglePlay , it checks w...

How to use Google spreadsheet data in my website page? -

The data in Google Spreadsheets is like EmpId | EmpName 1 | John 2 | Jerry I want to display these data in my weblist (say www .example.com/employeeList.html) but I do not want to publish the above spreadsheet, only when I user the above page link Then I would like to get the record Note: The document will be in Private mode. Thanks Try to parse it as JSON or XML I It does not know much about how the API receives information, but there are some tools that can help you. The link is coming soon. Do you like a specific format? If the document is private, then there should be some type of authentication to get the locked data and then it will know how to purse it, or both at a time.

java - How to cancel notification in onDestroy function -

I want to make a notification like BBM connected information (for android) ... so when I open my app , The notification will appear, and it can not be canceled ... then I use this code nm = (NotificationManager) getSystemService (context.NOTIFICATION_SERVICE); Notification Notification = New Notification (Android.Radrowerable.stat_notef_adm, "This is Important", System.contentime millis ()); Notification.flags = Notice. FLAG_NO_CLEAR; // Notification is missing any reference reference = main activity this; Charasata title = "Hello there"; Extreme Extension = "This is Demo"; Intent = intent (intent, main activity category); Pending pending = pending content Gate activity (context, 0, intent, 0); Notification.Setlat EventInfo (context, title, extension, pending); Nm.notify (0, notification); I had put that code in the public void on the crate (bundled saved instance) ... so, when I can not cancel the notification on click or slide, Close, I still h...

java - Usage of WiFi-Direct in Game Development (Android) -

I am developing board games in Android. I want to play this game on two different devices, for that I have to use WiFi-Direct. I want to know that any library is available which will help me find and connect with the device The board between two devices after the touch-listener event Send and receive coordinates I am interested in the built-in library. Or, if possible, please share the implementation examples of client / server architecture. This is for the server: thread servertrread = new thread (New Runnabal) {@Override Public Zero Run ({{serverSocketTCP = New ServerSet ()); ServerSocketTCP. Reset Resetress (true); Server socketsccp.band (newinetacademyadder ports)); Whereas (status) {clientSocketTCP = serverSocketTCP.accept (); BufferedReader bufferedReader = New InputStreamReader (client.getInputStream ()); Output stream output stream = client.getOutputStream ();}} Catch (exception E) {E.printStackTrace ();}}}; serverThread.start () ; This is for the customer: ...

deployment - How to turn off fast-forwarding in Git? -

We are trying to use GIT to develop our project. We work from our personal treasure To deploy on our hosting, we will send ftploy.com We used to test it, all the work was just manually deployed, but it does not work automatically, when we merge the pull-request to our Master Branch. I asked the support of this problem, the answer is: Currently, if you are using a bitbasket and using a merge, Need to turn off fast-forwarding on GET installs. Because I am a newbie, I can not understand what should I do and how my local GIT has been established which is linked to our main reserves on any other account? You want to close it for a given branch: git config branch.master.mergeoptions "--no-ff" For any branch: git config merge.ff false (from) Those commands are executed in repo where you want not fast-forward (see "" ).

function - Call flow for the code - C -

I'm looking for a microcontroller in some code. I think mostly code, but this piece of code is bothering me, including the relevant definitions for the data types used. I have replaced the function and variable names for ease. I define typefif zero (* some_type) (zero * p); some_type some_arr [COUNT] = {NULL,}; Zero init (zero) {first_function (and second_function); } Zero first_function (some_type cb) {if (some_arr_count & lt; COUNT) {some_arr [some_arr_count ++] = cb; }} void second_function (Zero * P) {another_type * req; Req = (another_type *); p; // some other code goes here} 1. What does this typingfiff mean? typed zero (* some_type) (zero * P); The init () function is called only once and there is only one line of code in it. 2. What does this line do? first_ work (& second_function); I searched the entire project code for the second task, and this only shows the only place in addition to the function definition. 3. Then how does one ge...

php - when there is no data found set null -

I am using jquery to get value from php scripts and keep them in between tags. But sometimes nothing is sent as value. Then I would like to show words nonsense. $ Ajax ({type: "POST", url: "Relations / Relations Report" data: { "Clent" Clint, "project" project, "Van" Van, "Baby" tot}, datatype: 'json "error: function () {alert (" Onvoldoende gegevens beschikbaar om rapportage to genereren. ");}, success: function (data) {// Plaats data op de juiste Plek D table var = data in titel. Titel; Projektid = Detakprojektid; Kansolklog (Projektid); $ Kpost ( "Rpportge / Rpport_ditel" {Projektid: "Projektid"}); Projektype = Detakprojektype, Projektlandr = Detakprojektlandr, Projektype = data. Projecttype, statusproject = data.statusproject, startproject = data.startproject, deadlineproj ect = data.deadlineproject, omzetproject = data.omzetproject, kostenproject = data.kostenproject, totaalur...

javascript - Why we use this `Jquery(document).ready()` instead `$(document).ready()` -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब हम इसका उपयोग क्यों करते हैं Jquery (document) .ready () के बजाय $ (document) .ready () असल में यह दोनों एक ही परिणाम दे रहे हैं, लेकिन इसका इस्तेमाल करने का कारण क्या है इनमें से एक, सामान्य रूप से खो चुके लोग $ (document) .ready () का उपयोग कर रहे हैं यह आमतौर पर "$" चिह्न का उपयोग कर रहे अन्य पुस्तकालयों के साथ संघर्ष से बचने के लिए है।

Developing video player app for Windows phone with more media codec support -

I want to develop a video player app for Windows Phone 8 with more media codec support like MKV, AVI, etc. I'm thinking. And I also want to add subtitle support too. I'm new to WP8 development, so I'm still working on viability. As far as I know, supported media codecs do not include formats like MKV or AVA. But I know about a WP app (Mollyper) which provides support for almost all media codecs and subtitles. I am wondering if there is a third party library or something that enables the development of a video player app with the above capabilities? If not, what are the possible approaches to developing like Mollyplayer? Thanks in advance! The fastest way to get up and walk is to bring the video playback into the App Player Framework (hosted on CodePlex Done) This will provide you closed caption support and some nice playback controls (with many other features). For codec support, it is a bit difficult for your best bet for Silverlight, to create a mediastream...

node.js - Sublime Text 3 Gulp Package -

Am I new to Sublime & Gulpace ?? I am trying to install a sublime-gulp package in Sublime Text. 3. After seeing a bunch of packages to look at the node on my system (finally resolved by installing "SublimefixCompath" package). The package is installed in Sublime and I am in a folder in Sublime where I have Gollpa installed and working from the command line, but when I run the "Gulp" command from the command palette This error message is getting: "SublimeGulp: There was an error running the bulb. Make sure that the fiction is running correctly in your project." I think that Maybe I'm missing something fundamental, but I My $ PATH and $ NODE_PATHs have been double-checked, global and local copies of NPM and SIP (and all my bullets module) were re-installed, but it still does not work. It seems that the answer is in the comment: "I have installed a manual and it is all right Are working fine now. "

php - Insert values in mysql table with post method -

Currently I'm having trouble adding some lists to MySQL. I have a table: code> bidder column id type run_id min_bid max_bid me min_bid and MAX_BID . I'm getting this with the post method. This issue is that as I have different bidder types, I may need multiple prices for 1 bidder or I may only need 1 price. I separated the post value, so I can distinguish the difference when I need it. To save 1 value or 2 values. ] = & gt; String (1) "5" ["get_bid1"] = & gt; String (1) "6" ["get_bid_low2"] = & gt; String (1) "7" ["get_bid_high2"] => String (2) "11" ["get_bids"] = & gt; The string {8} "set bid"} then the table bidder must be saved like this: + - ---------------------------------------------- + | ID | Type | Run_id | Min_bid | Max_bid | + ----------------------------------------------- + | 1 | Stable | 1 | 5 | 5 | | 2 | Stable ...

form submit - Blank page after submitting external HIT in MTurk -

If I submit my external HIT with the URL, then it is successfully sent to MTUCAK (my requestor sandbox I can see the result), but a blank / blank page appears for the worker, instead of confirming that he / she has successfully submitted to the HIT ... I think my The verb-parameter in the form is incorrect ... This blank page The HTML-code looks like this: & lt; Html & gt; & Lt; Head & gt; & Lt; Title & gt; & Amp; ln; Bean: Message key = "external_submit.title" / & amp; Gt; & Lt; / Title & gt; & Lt; Script type = "text / javascript" & gt; Function reloadpage () {var boxes = top document.gate elementsByanName ('autoexquired'); If (boxes length == 0 ||! Boxes [0].) {Top.location = top.document.getElementById ('HitXanNational Link'). Href; } And {top.location = top.document.getElementById ('hitExternalNextAcceptLink'). Href}}} & lt; / script & gt; & lt; / head & gt; bod...

multithreading - Java java.util.concurrent.locks.Condition interface documentation -

Inside the document for the condition interface: is an example class that uses the condition . I will copy / paste here: Class BoundedBuffer {Last lock lock = new ReentrantLock (); Final bet not full = lock. NewCondition (); Not the last bet = empty = lock. New condition (); Last item [] item = new object [100]; Int petter, techtor, count; Public Zero Insert (Object x) Throws Interwerted Explanation {lock.lock (); Try {while (count == items.length) not full.await (); Item [putptr] = x; If (++ putptr == items.length) putptr = 0; ++ count; notEmpty.signal (); } Finally {lock.unlock (); }} Public object () throws blocking exception {lock.lock (); Try {while (count == 0) notEmpty.await (); Object x = item [techter]; If (++ techter == item.label) left = 0; --count; NotFull.signal (); Return x; } Finally {lock.unlock (); }}} I do not understand how this might possibly work (note: I did not test it, I think it works) a deadlock Without making? If I call Bunda Befter a hundred ti...

javascript - User input fields better with DIVs or forms for a webpage that just calculates a formula? -

I have to keep 6 input fields in the webpage if the user presses a button 6 fields 7,8, 9 or 10 fields Spreads up to. Fields are editable and come with a preset value. With the input from user (or predetermined value) a final value is calculated by a formula. Is it better to use form for fields or DIV s? Should I use the javascript or something else I'm still thinking about? Did I think of using Excel like I created the code with jQuery but for my needs it was It seems more plus I will need a lot of editing because I need a simple show of fields. I will use a form because you are asking users for your data Input. If you are also targeting those platforms, it will also trigger the keyboard on mobile / tablet devices. Javascript is okay for this, as long as you do not want to hide the formula that you are using (because they will be able to see that they see your source). Do you need to use AJAX? Are changes in pre-populated values ​​too much? If not, t...

JavaScript embed contentWindow -

I'm trying to do a JavaScript postMessage , such as you do for an iframe Now, an embed I have to use an embed as it is for an app that is loaded on iOS device, and when there is a bug with IFrame width and height in iOS then I have to use an embed . It is loading and embedding I can post messages to parents, but in some way I can not post in embeds. Did I try: document.getElementById ("embed") contentWindow.postMessage (...) document.getElementById ("embed"). ContentDocument.postMessage (...) GetElementById ("Embed") document. Document. PostMessage (...) document.getElementById ("Embed"). GetSVGDocument () / / empty return current embed setup: & lt; Embed src = "URL" id = "embed" type = "text / html" & gt; & Lt; / Embed & gt; Any solutions for this? If you want to get an element by ID in JS, you have to enter an ID in your element So that the JS script can find it: ...

css - positioning the text in the center of li tag -

I have created three blocks using the HTML code as shown below. The minimum height in the "A" tag is CSS property , Due to which it will be displayed as a block. I can not insert text inside the Span tags in the center of the " li " tag. Although each text inside the tag is of a different length, I want to display them at the center. & lt; Div class = "container" & gt; & Lt; Div class = "col-md-12" & gt; & Lt; Ul id = "tab" category = "new-tab" & gt; & Lt; Li class = "col-md-4 nav-list" & gt; & Lt; A href = "#" class = "new-block" & gt; & Lt; Span class = "header" & gt; Data & lt; / Span & gt; & Lt; / A & gt; & Lt; / li & gt; & Lt; Li class = "col-md-4 nav-list" & gt; & Lt; A href = "#" class = "new-block" & gt; & Lt; Span class = "header" & gt; ...

c# - object reference not set to an instance of an object. (Exception) -

इस सवाल का पहले से ही एक उत्तर है: 2 9 उत्तर यह अपवाद प्राप्त करने के लिए: ऑब्जेक्ट संदर्भ किसी ऑब्जेक्ट के एक उदाहरण के लिए सेट नहीं है। कृपया मुझे बताइए कि कैसे इसे हल करें। मैंने कोशिश की है जो विवरण में दिया गया है जो अपवाद को हल करने के लिए संकेत प्रदान करता है। निजी voidtreeListCom_CompareNodeValues ​​(ऑब्जेक्टर्स, DevExpress.XtraTreeList.CompareNodeValuesEventArgs ई) {try {string strColName = "उत्पाद"; स्ट्रिंग str1 = e.Node1.GetValue (strColName) .ओस्ट्रिंग (); स्ट्रिंग str2 = e.Node2.GetValue (strColName)। टॉस्ट्रिंग (); यदि (str1 == "जोन" & amp; amp; str2 == "जोन") {if (e.Node1.ParentNode == शून्य) {e.Node1.Selected = true; } ई। परिणाम = 0; } और अगर (str1 == "जोन" & amp; amp; str2; = "क्षेत्र") {ई। परिणाम = -1; } और अगर (str1! = "जोन" & amp; str2 == "जोन") {ई। परिणाम = 1; } Else {strColName = treeListCom.Columns [0] .FieldName; E.Result = e.Node1.GetValue (strColName) .ओस्ट्रिंग...

No user defined transport headers in pulled messages from queue OSB JMS WLS -

IM is facing a problem with my JM message. Here's the case: In my main PS, I send an employee on request, to whom employees from BS get emploeeId> Reaction is a collection of employees During main action in the main collection, I want to add an employee to the Loop JMS queue as a simple message through the whole collection and ID. In the user-defined transport header in each loop iteration, if the messageName 'even' or 'odd' relies on the employee id on the outbound request as a statement. On the logged result I can see that the header has been properly added (still for every employee) I publish my JMS-BS which adds messages to the queue. When I want to draw my message to JMSConsumerPS, I do not have any transport headers that I have added. The consumer has the assets of all the headers set as 'yes'. My complete logging in the consumer $ inbound / ctx: transport and What do I get: & lt; Thieves: Transportation & gt; & Lt; Thief: u...

c# - Add ThumbToolTip to Slider -

How to add thumbtrip to a slider (I am currently working with Windows Phone 8.1 RT)? I have tried to set the value to the value (which is also a default value): & lt; Slider maximum = "100" value = "10" horizontal align = "stretch" thumbnail type value converter = "{static processing tool tip convection}" instoflotipiped = "true" /> But no tooltip was shown. I can think of creating a control and tie it to the value of the slider, but can it be an easy way? Windows Phone 8.1 Default ThumbToolTip is not available for . Windows 10 UWP applications work fine

javascript - How to store the dollar ($) to a variable in jQuery -

var name = '$ {tokenid}'; im trying to assign value "$ {tokenid}" to the name variable but there is nothing in the variable after execution How do I I do not know what problem you have, but here it works like a charm http://jsfiddle.net/EdC9H/ You can call it single or double > In quotation marks, you can put in both.

javascript - Split JSON object with square backet names into sub objects -

We are sorting a form using the serializeObject and then it's in a local storage JSON encoded strings are stored as. When we return this back of the local level, then we have flight [inbound] [0] [ISO] and flight [outbound] [1] [date] etc. This makes it difficult to loop properly afterwards (in JavaScript) because we now have to make the form again with the data stored. Is there a way to sub-names and decode these key names? Objects? For example: flight [outbound] [0] [datetime] = "something"; Flight [outbound] [0] [from] = "something"; Flight [outbound] [0] [to] = "something"; Flight [outbound] [0] [carrier] = "something"; Flight [inbound] [0] [datetime] = "something"; Flight [inbound] [0] [from] = "something"; Flight [inbound] [0] [to] = "something"; Flight [inbound] [0] [carrier] = "something"; should change to: flight = {outbound: {0: {from time to time: "something", f...

c# - Should type information be encoded in parse tree? -

I am working on a project with a small DSL. In the results of this language, to parse a string and parse it in a parse tree, it is implemented as an abstract class named XP, after which there are many general derivative classes like assignments XP, INVQUEXXP, ADISXXP, ET etc., Which are related to the nodes of the pars, which are assignments, function invocations, add and so forth. The project has been implemented in C #. I am currently considering the implementation of type estimation for this DSL. This means that I want to take an example of EXP class and be able to withdraw some encoding information about different types of nodes in the tree. This type of information depends on a symbol table (types of variables) and function tables (function signatures). In this way, I would like to do something like this: typed exposed typed expired = avatar type (xp., Symboltable, functiontable) here Expressed typing exemptions, ideally except the type of expression giving expression ...

exception handling - How can I pass data to the MATLAB oncleanup function? -

I have a compiled matlab program that automatically tunes the machine parameter. At the end of a tuning cycle I need to restore some basic settings. I have unexpected errors at some time and sometimes the user can see that the tuning algorithm is not working properly, so it should be finished Should (with control-C) If there is an approximate error, then I try to hold a block. However, if there is an unexpected error or the user invokes Control-C, then the program goes out without passing, although the hold segment and the machine are left in an undetermined position. I know that I will run a cleanup function as the function of my work, either in general or by an unexpected error, or Control-C event. Ideally, clean work functions can not do anything and if there is an estimated error, then there is a control over the top level to clean it. If there is a control-cum-event or an unexpected error, then clear that the user should warn that the program has failed so that it can be c...