Posts

Showing posts from May, 2010

php - What is PDO , how it's related with sql injection & why i should use this? -

Image
Actually I did Google and got so many results, but I do not understand, 'I'm new in this field Am So any 1 can tell me in simple ways that what is PDO, why should I use it, what is SQL injection with example. Actually now my code is so that someone can help me ??? config.php & lt ;? Php $ mysql_hostname = "localhost"; $ Mysql_user = "root"; $ Mysql_password = ""; $ Mysql_database = "testdb"; $ Prefix = ""; $ Bd = mysql_connect ($ mysql_hostname, $ mysql_user, $ mysql_password) or die ("Could not connect to database"); Mysql_select_db ($ mysql_database, $ bd) or die ("database could not be selected"); ? & Gt; insert.php & lt ;? Include php ('config.php'); $ Account_no = $ _ post ['account_no']; $ Amount = $ _ post ['amount']; $ Save = mysql_query ("Include table mirror (account_no, volume) values ​​('$ account_no', '$ amount',")); Hea...

c - Sizeof pointer differs from its representation with printf? -

जब मैं करता हूँ int k = 9; Printf ("sizeof k:% zu \ n", आकारफ (& amp; amp; amp; amp;; k)); मुझे आकार 8 के रूप में मिलता है। लेकिन जब मैं प्रिंटफ़ ("p:% p \ n", & amp; amp; k; मुझे 0x7fff57e3ba24 मिलता है। मैं देख सकता हूं कि यह 12 हेक्स नंबर है जिसका अर्थ है (1 हेक्स 4 बीट्स के बाद से) कि सूचक 48 बिट्स पर रखता है जो 6 बाइट्स है। सवाल: क्यों आकार के आकार का प्रिंट 8 सूचक के लिए है, हालांकि इसकी केवल 6 बाइट्स? आपका तर्क यह है कि यदि मैं printf लिखता हूं ("%" डी ", 4); और यह 1 दशमलव अंक प्रिंट करता है, जो संभावित रूप से 1 बाइट में संग्रहीत किया जा सकता है, फिर sizeof (int) 1 बाइट होना चाहिए। संख्या 0x7fff57e3ba24 समान है 0x00007fff57e3ba24 । सिर्फ इसलिए कि इस प्रकार की संख्या को कम से कम कर सकते हैं, इसका मतलब यह नहीं है कि यह किसी भी कम स्थान पर है।

Are there macros which can be used to test Erlang version in driver C code? -

Erlang R15B जोड़ा ErlDrvSSizeT typedef, और R16B जोड़ा erl_drv_output_term समारोह और पुराने समकक्ष को नापसंद किया क्या पुराना एर्लंग के संस्करणों को उसी कोड के साथ समर्थन करने के लिए पूर्वप्रक्रमक मैक्रोज के साथ इन मतभेदों का परीक्षण करने का कोई तरीका है? आप ERL_DRV_EXTENDED_MAJOR_VERSION और उपयोग कर सकते हैं ERL_DRV_EXTENDED_MINOR_VERSION मैक्रो मूल्यों, erl_driver.h में आपूर्ति, सुविधाओं के बारे में निर्णय लेने के लिए। जब भी ड्राइवर एपीआई बदलता है, ये मान उपयुक्त रूप से बढ़ते हैं। ये वेतन वृद्धि हमेशा Erlang / OTP रिलीज़ नोट में समझाया गया है। उदाहरण के लिए, Erlang / OTP R15B कुछ एपीआई समारोह पैरामीटर प्रकार पूर्णांक से एक नए प्रकार ErlDrvSizeT करने के लिए बदल 64-बिट प्लेटफार्मों से बेहतर ढंग से सामना करने के लिए आप इस के लिए जांच कर सकते हैं और नीचे दिए गए कोड का उपयोग करते हुए पुराने पूर्व-आर 15 बी संस्करणों के लिए इसकी क्षतिपूर्ति कर सकते हैं: #if ERL_DRV_EXTENDED_MAJOR_VERSION & lt; 2 टाइपिंगफेस इंट एरलड्रॉव एसईजेटी; #endif यह typedef आप ErlDrvSi...

dropdownbox - how to insert three dropdown valuein one field in to database -

How can I add a date of birth to three dropdown values ​​in my database to my database? Am I correcting $ dob or is not it? Please help me My form & lt; Form name = "" id = "order-form" class = "smart-form" role = "form" verb = "" method = "post" enactepe = "multipart / form-data" & gt; & Lt; TR & gt; & Lt; Td> & Lt; Font color = "# 334D66" & gt; Date of Birth: & lt; / Td> & Lt; Td> & Lt; Select name = "birthday" & gt; & Lt; Option selected & gt; & Lt; / Options & gt; & Lt; Options & gt; 01 & lt; / Options & gt; & Lt; Options & gt; 02 & lt; / Options & gt; . . & Lt; / Select & gt; & Lt; Select name = "birthmate" & gt; & Lt; Option selected & gt; & Lt; / Options & gt; & Lt; Option & gt; January & lt; / Options & gt; & Lt; Option ...

osx - LLDB - Exit on... exit? -

I currently want to fully automate my compile-run-debugging process for cocoa / purpose-projects I am writing a script. My last line of code is: lldb -f builder / MyApp.app -o "run" which actually opens the debugger, connects the process, and runs it. However, when the app is released, the debugger is open, waiting for a command. In addition to shutting it in any way, after the attached process is finished? One way to do this will be to use Ajith binding, and the incidence of LDD Will listen for If you run the following script, it is a lunch app in debug mode, and well if you close the app script: Other ways might also work: Run the app, Get the screen of the running app, Start LDD and PID Attach to Monitor if the app is running and I do not have to kill l lbb.

Split rule of args in main function in Java? -

Here is a strange problem I ran: Program has been created Args, here is the code: test for public class {public static zero main (string [] args) {for (int i = 0; i & lt; args.length ; I ++) {System.out.println (Args [i]); }}} Then I created a jar file and run the following command: java -jar test.jar test and 1 However, this does not print as expected "test and 1", the result is: test '1' has internal or external commands, operative programs Or is not recognized as a batch file. So my question is: What is the separation of Argus? If I really want to get "test and 1", then what should I do? Thank you! There is nothing to do with Java & amp; The character is special for the Windows Shell (I can tell it to Windows with the error message) : it separates two rows on one line, so what are you doing Java -jar test.jar test is telling the shell to run and then runs 1 . If you want to go to test & amp; 1, you must put...

ios - UICollectionView doesn't display any image -

I am trying to display the image from the document directory in the UICollectionView, everything is fine but no image is visible. - View (zero) viewsDidload {[Super Viewedload]; // Start Recipe image array NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, yes); NSString * document directory = [path item overindexx: 0]; NSArray * dirContents = [[NSFileManager Default Manager] Contentoff DirectoryAct Path: Document Directory Error: Zero]; NSMutableArray * image = [NSMutableArray array]; (For dirContents in NSString * tirring) {if ([tString hasSuffix: @ ". Png"]) {[image addObject: tString]; ListeImages = [NSArray arrayWithArray: image]; }}} - (NSInteger) collectionView: (UICollectionView *) collectionView NumberOffAd Insights: (NSInteger) section {return listeImages.count; } - See the (UICollectionViewCell *) collection: (UICollectionView *) collectionView cellForItemAtIndexPath: (NSIndexPath *) index path {static NSString * ide...

What does [`something] some_vector ; mean in verilog? -

Assume that I have defined some macros, and then some other strings have been defined. What does this mean when I like it? Does it just mean taking 2 LSBs from the wire? Define 'AdEfien 32' * Here some code * Output ['adfine-1: 0] my_out_wire; // * More code here * I can not find any explanation for this meaning. syntax define 'A_DEFINE 32' a A_DEFINE Declared a macro. The macro is something you can use to make text replacements in your code. Syntax `ADefine` means A_DEFINE extension of the macro is essentially assuming the value of A_DEFINE and Copying to the place where the macro has been expanded. The preprocessor does this for you. In essence, you will end with: // * Here are some code * Outputs [32-1: 0] my_out_wire; // * More code here * Defines that your code needs to be a configurable element. In this way, if you have many hints that are in widespread form, then you define only if you need to change from 32 to 64, you can ...

pattern matching - Regex conditional match -

one ?? ¢ ~! @Pages to work as a placeholder of 1-3? ¢ Asterisks are allowed in 2-5 positions? Â ¢ should be a status alphabet (except for ~! @) A ?? ¢ Should not accept any letter numbers ¢? ¢ In addition to the exceptions described above, no specific characters are allowed This means that if my first word is ia alphabet then 2-5 may be alpha or * (2- 5 is not compulsory but if we enter it should be alpha or *) But if we are using then 2-3 should be the situation! @ Now I ^ [a-zA-Z ~] [a-zA-Z *] {0,4} [a-zA-Z] * $ ", Pattern. CASE_INSENSITIVE) For the string that starts with ~! @ : ^ ( ? I? (?: [Az] [az *] {0,4} [az] * | ~! @ [Az *] {0} [az] *) $

qt5 - Where is located the qDebug qWarning qCritical and qFatal log by default on Qt? -

While running my Qt5 application on Linux, I do not see any output from qDebug, qWarning, qCritical or qFatal. That is, I can use the qInstallMsgHandler to install a message handler and view them, but it is rather heavy. I just look at the QWarning log to see if there is any way to connect to the signal that is wrong, is there any way to see this log? A special command line option, an environment variable? I think I remember that before, everything was printed in stderr, maybe it's a QT5 change? do not mistake qDebug, qWarning, qCritical and qFatal always logging on standard error . This is not the case at all. The actual destination depends on QT configuration and targeting OS. Apart from this, 5.4 has introduced some practical changes to see and discuss. TL: DR: Qt> = 5.4: If you want to always log on to stderr Set the QT_LOGGING_TO_CONSOLE environment variable to 1 for. If you do not want to log on to stderr, then QT_LOGGING_TO_CONSOLE envi...

Java and Python - System.console() returns null when started from subprocess -

I am trying to start a Java file in a subprocess in Python. The problem is that System.console () returns zero in Java, though I am redirecting the STD stream. server_startcmd = ["java", "-xmx% s"% self.java_heapmax, "-xms% s"% self.java_heapmin, "-jar", self.server_jar, self. Java_gui,] self.server = Popen (server_startcmd, stdout = PIPE, stderr = PIPE, stdin = PIPE) self.outputs = [Self.server_socket, self.server.stderr, self.server.stdout, sys.stdin] When I run the Java command from the command line, it works fine. I really can not understand what I can do to simulate a console or something like that? Finally, I use pty to pseudoterminal. This time in Ruby: is required 'pty' @master_io, slave = PTY.open read, @write_pipe = IO.pipe pid = spawn (server_startcmd) ,: However thanks for the help!

html - Make table 100% of parents height? -

I have created a jsfiddle to show my problem: & lt; Section class = "text clearfix" data-theme = "white" & gt; & Lt; Div class = "bemassung" & gt; & Lt; H3 & gt; Bichchucunnen Bis Zoo Folgaden Maximanal Alabama? En darfa? RBR: & lt; / H3 & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; Td> Art Fear Bashing & lt; / Td> & Lt; TD & gt; Länge & lt; / TD & gt; & Lt; TD & gt; Breite & lt; / TD & gt; & Lt; TD & gt; Höhe & lt; / TD & gt; & Lt; TD & gt; Gewicht & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Img src = "property / pictures / charts / writingingsizeboat / naslak page" /> & Lt; P & gt; Nose & lt; / P & gt; & Lt; / TD & gt; & Lt; Td> 18.000mm & lt; / Td> & Lt; Td> 4.000mm & lt; / Td> & Lt; Td> 4.000mm ...

c - Error while compiling and linking dll -

I am trying to compile the following simple DLL. I have been successful in doing everything successfully, but the last step When I execute the command: gcc-o Maiprog myprog.c -l./ -lmydll me say it gives an error that Hello () has not been declared in the area I was unable to follow the tutorial verbatim, even though I compiled yet simple project I and why I am so why lose. The code for individual files is as follows: (myprog .c) int main (zero) {hello (); } (mydll.c) #include & lt; Stdio.h & gt; Int Hello () {printf ("Hello World! \ N"); Return 0; } The example is working fine for me in my signin armathew @ 3NJ2VQ1 / cygdrive / d / userdata / armathew / desktop / WWWW $ ls mydll.c myprog.c armathew @ 3NJ2VQ1 / cygdrive / d / userdata / armathew / desktop / WWWW $ gcc -c mydll.c armathew @ 3 NJ 2 VQ-1 / Saigraiv / D / Ughrdeta / Armthu / desktop / Dbludbludbludblu $ GCC -sear O Maidel Dial Maidelko Armethv @ 3 NJ 2 VQ-1 / Saigrediv / ...

coldfusion - What are the options for queryOptions in the queryExecute function? -

नई कोल्ड फ्यूजन 11 फंक्शन queryExecute के ऑनलाइन दस्तावेज़ यहाँ है: क्वेरी एक्सेक्यूट (sql_str, क्वेरी पैरामाएं, क्वेरी ऑप्शन); क्या किसी को इस फ़ंक्शन के लिए "queryOptions" के सभी विकल्पों के लिए दस्तावेजीकरण है? केवल एक ही विकल्प सूचीबद्ध दस्तावेजों के उदाहरण में हैं: परिणाम डेटा स्रोत fetchclientinfo cachename मुझे केवल "डेटा स्रोत" और यह क्या है के बारे में निश्चित है। "कैश्डविहीन", "ब्लॉकफैक्टर", और अन्य विकल्प जैसे & lt; cfquery & gt; के साथ प्रयोग किया जा सकता है। यह cfquery के समान है: blockFactor =" block size "cachedAfter =" date "cacheID =" ID "कैश रीजन =" क्षेत्र "कैश किया गया है =" timespan "डेटा स्रोत = "डेटा स्रोत का नाम" dbtype = "query" debug = "yes | no" fetchClientInfo = "yes | नहीं" maxrows = "number" ormoptions = #orm विकल्प संरचना # पासवर्ड = "पासवर्ड" परिणाम = "परिणाम का नाम...

php - Magento Layot XML - Change template for 2columns-left.phtml -

I am working on a Magento project which is based on the Ultimo theme and is using the Wordpress WordPress extension. I'm just trying to change the 2column-left.phtml template on WordPress pages, but it can not work! Next scenario: Altimo theme is the main content before the left content of the set and the float: right; After using the CSS rule on the main content, the left column HTML is structured like this: & lt; Div class = "col-main grid4-3 grid-col2-in-col2-in-col2" & gt; [Omitted code] & lt; / Div & gt; & Lt; Div class = "kernel-left sidebar grid 4-1 grid-to-sidebar sidebar" & gt; & Lt; Div class = "wp-sidebar" & gt; [Omitted code] & lt; / Div & gt; & Lt; / Div & gt; This HTML is being generated with last / default / template / page / 2column-left.phtml as follows: & lt; Div square = "Cola-main grid 4-3 grid-colo-2-in-cola 2" & gt; & Lt ;? Php echo $ ...

android - Check if Fragment exists in Fragment TabHost Activity -

I have an activity, which implements the fragment tab host with 2 tabs The first tab is a list view and The second tab is the same data in a detailed data view. Below is the code snippet from My Piece Activity: Find the Fragmentabhaostsubbiid (android.R.id.tabhost); MTabHost.setup (this, getSupportFragmentManager (), R. layout.action_list); MTabHost.addTab (mTabHost.newTabSpec ("Tab1"). Set indicator ("list"), ListFragment.class, null); MTabHost.addTab (mTabHost.newTabSpec ("Tab2") .Setindicator ("Extlist"), expandable listfreagment class, arg2); The issue now is that if I call again the pieces of its construction again, I need to check that the piece is already present, to add a new one Not required I tried under the stuff, but it is not working piece f = getSupportFragmentManager (). FindFragmentByTag ("list"); If (f! = Listed for blank & amp; amp; events) {Log.i ("ListActivity", "Already Created")...

php - Get embedded values in javascript function on HTML Page -

I am using php and trying to get value in javascript function. The HTML page contains the following JavaScript: & lt; Script type = "text / javascript" & gt; Function Show (q) {if (q.length & gt; 0) {if (q.indexOf ("tid")> -1) {location.href = "map.jsp?" + Q; } And {location.href = "listmap.jsp?" + Q; } } return false; } $ (Function () {$ ("# map"). GoMap ({Latitude: -35.331415, Longitude: 14 9.131851, Maitrippe: 'Roadmap', Scrollwell: False, Zoom: 11, Marker: [{Latitude: -35.192103 , Longitude: 14 9.332313, icon: 'images / m / marker1.png', html: {content: 'Loading ...', Ajax: 'mapinfo.jsp? Sid = 9057'}}] I have latitude and longitude which is: -35.331415 and 14 9.131851 I'm not sure the values ​​of the other values ​​(3 and 4th rows Getting needed) How to use personal values ​​... EDIT: I am using PHP to save these values ​​in the variable and later I write it in a C...

svg - Black background (instead of transparent) after drop shadow in ImageMagick -

Image
I am trying to leave a shadow in the structure of two images: a JPEG / PNG and a SVG vector. Everything works basically with the PNG image, now I am trying with JPEG, I get a black background instead of the expected transparent background. The command looks like this: Convert image.jpeg -background white - flatten (any vector.svg of background-) --compose CopyOpacity -Gravity Center -composite \ (\ clone-background \ # 111 -Shadow 80x5 \ +5 \ +5 \) -background none -define DSTover-Flaton result_from_jpeg PGG We recommend this JPEG Let's start with: or this PNG: Then we make vector, because it is white Is able to see you raw If not, then here it is with the grid: The real vector is: Then we release the shadow, starting with PNG we get the right (transparent background): But with JPEG, the background is black instead: Dump all the files into a zip Can be loaded: What could be any of its ideas? thank you in advanced! Edit: My version of IM:...

Apache2 Authentifiation with LDAP -

I have & working with lt LDAP Authentification; Directory & gt; But now I need the same with & lt; Location & gt; . Tasks: & lt; Directory / home / foot-bar / & gt; AuthType Basic AuthName "foo bar" AuthBasicProvider ldap AuthLDAPUrl ldap: //www.foo.bar DAV AuthLDAPBindDN cn = admin, DC = AuthLDAPBindPassword foo AuthLDAPGroupAttribute MemberUID AuthLDAPGroupAttributeIsDN requires a valid user lock & lt; / Directory & gt; Nothing: service works when I tested with it allow the IP address 1.2.3.4 Oder when I try a password file, but nothing happens (= browser displays pages) when I try ldap authentification This works:. & lt; Location / railwayo -context / & gt; AuthBasicProvider ldap AuthType Basic AuthName "Railo administrator" AuthLDAPURL ldap: // www ...... AuthLDAPBindDN cn = admin, dc = .... AuthLDAPBindPassword ..... need ldap user ..... & lt; / Location & gt;

Parse error: syntax error, unexpected 'echo' (T_ECHO) in C:\test_USSD2\listener.php on line 46 -

यह प्रश्न एक सटीक डुप्लिकेट है: मैं डेटाबेस से चुनने की कोशिश कर रहा हूं, लेकिन यह त्रुटि प्राप्त करने के लिए: पार्स त्रुटि: वाक्यविन्यास त्रुटि, पंक्ति 46 पर सी: \ wamp \ www \ Project \ USSD_Misec \ test_USSD2 \ listener.php में अप्रत्याशित 'गूंज' (T_ECHO) यह मेरा कोड है: & lt;? Php शामिल हैं "func / database.php"; // $ db = नया डाटाबेस (); $ Db = नया डाटाबेस ('स्थानीयहोस्ट', 'उपयोगकर्ता नाम', 'पासवर्ड', 'डेटाबेस_नाम'); $ Db- & gt; कनेक्ट (); $ डेटा = file_get_contents ("php: // input"); $ पंक्ति = "\ n -------------------------------------------- ----------------- \ n "; File_put_contents ("लॉग / ussdgw.txt", $ डेटा। "\ N", FILE_APPEND); $ डेटाडिकोड = जेसन_डेकोड ($ डेटा); $ Uri = array_reverse (विस्फोट ("/", $ _SERVER ["REQUEST_URI"])); $ Usid = $ uri [1]; $ कार्रवाई = $ यूरी [0]; $ Defaultmenu = array ("should stop" = & gt; गलत, ...

qt - Synchronize QTableWidget cell with widget in the center of the cell -

मैं QCheckBox में QTableWidgetCell QWidget * विजेट = नया QWidget (); QCheckBox * चेकबॉक्स = नया QCheckBox (); QHBoxLayout * लेआउट = नया QHBoxLayout (विजेट); लेआउट & gt; addWidget (चेकबॉक्स); लेआउट & gt; setAlignment (क्यूटी :: AlignCenter); लेआउट-> सेट कंटेंट्स मार्जिन (0, 0, 0, 0); विजेट & gt; setLayout (लेआउट); टेबल- & gt; सेटसेलवेल (0, 0, विजेट); इस कोड का नतीजा केंद्र में चेकबॉक्स वाला सेल है। मुझे माउस को हिलने और रिक्त क्षेत्र में क्लिक करने के लिए चेकबॉक्स प्रतिक्रिया करने की आवश्यकता है जैसे कि कर्सर चेकबॉक्स के अंतर्गत है। यदि आप QCheckBox की पूर्णतापूर्ण कार्यक्षमता नहीं चाहते हैं, लेकिन बस चेकमार्क, आप एक सरल QTableWidgetItem का उपयोग कर सकते हैं और अपने चेकस्टेट को संशोधित कर सकते हैं। QTableWidgetItem * item = new QTableWidgetItem (); आइटम, & gt; setCheckState (क्यूटी :: अनियंत्रित); टेबल- & gt; सेट आईटम (0, 0, आइटम); कनेक्ट (टेबल, सिग्नल (सेलक्लाइट (int, int)), यह, स्लॉट (ऑनक्लाइट (int, int))); शून्य OnClicked (int पं...

actionscript 3 - Using RegEx how do I remove the trailing zeros from a decimal number -

I need to type some regigs which takes a number and draws zero behind any decimal point after I The action is 3. So I would like to write: var result: string = theStringOfTheNumber.replace ([regex], ""); For example: 3.04000 will be 3.04 0.456000 will be 0.456 etc I have spent some time looking at various regex websites and I thought initially before resolving this resolution. 1-9]) 0 + $ OR (\. \ D *? [1 0] > Code: var Results: string = theStringOfTheNumber.replace (/ (\. \ D *? [1-9]) 0 + $ / g, " $ 1 ");

mysql - SQL: How do I sort on an alias calculated column ADD add a count? -

I'm new to SQL and it's difficult to get information from my database, maybe some can provide guidance . Students Columns :: I Table name, notes, test_1_score, test_2_score, test_3_score, test_4_score, test_5_score, test_6_score, test_7_score, test_8_score , Test_9_score, test_10_score can I get down code to run without points in Group / pseudo am but I must do this without Moreover, I could not get to count work IsNull added Name, Note, yoga (IsNull (test_1_score, 0) + IsNull (test_2_score, 0) + IsNull (test_3_score, 0) + IsNull (test_4_score, 0) + IsNull (test_5_score to, 0) + IsNull (test_6_score, 0) + IsNull (test_7_score, 0) + IsNull (test_8_score, 0) + IsNull (test_9_score, 0) + IsNull (test_10_score, 0)) as points points Gropi points points, Points, notes; Eventually, I want a simple answer to show this: name numerology (# counting of trials has been completed) ?? | A | ?? | Nnotes Try it out: select name, notes, yoga (IsNull (test_1_score, ...

c# - DirectoryInfo.EnumerateFiles() Extreme Slow in Debug Mode -

I have put this code in a class of your project in the VS2013 .NET Framework 4.0 stable list & lt; String & gt; F = new DirectoryInfo (AppDomain.CurrentDomain.BaseDirectory + "imgdir \\"). EnumerateFiles ("*. *", SearchOption.All Directories). Select (x = & gt; x.FullName) .toList (); The debug mode (100'000 file & gt; 3 minutes) is very slow if I run fast without debug (& lt; 5 seconds). Debug mode is not favorable Binary produces additional data to assist debugging and generate it is. Enables release mode optimization and low (or any) additional debug data generates. Otherwise see this good article from StackOverflow: -)

angularjs - updating data between controller, service and directive -

मैंने निम्नानुसार एक साधारण सरल परीक्षण ऐप लिखा है: angular.module ( 'TddApp', [])। नियंत्रक ('मेनक्रूटन', फ़ंक्शन ($ का दायरा, $ रूट स्कोप, बैटलस्पेस सेवा) {$ scope.displayEvents = [{id: 1, नाम: 'बेलारूस v यूक्रेन', होमटैम: 'बेलारूस', दूरसंचार: 'यूक्रेन', बाजार: {घर: '2/1', ड्रा: '3/2', दूर: '5/3'}, प्रदर्शन: सत्य}]; $ scope.betslipArray = BetslipService.betslipArray; $ Scope.oddsBtnCallback = BetslipService.addToBetslip; $ scope.clearBetslip = BetslipService.clearBetslip;})। डायरेक्टिव ('अजीबबटन', फ़ंक्शन () {रिटर्न {टेम्प्लेट: '& lt; div class = "odds-btn" & gt; {{मार्केट '}', कॉलबैक: '& amp;;}, लिंक: फ़ंक्शन (क्षेत्र, तत्व): & quot;; & lt; / div & gt;', प्रतिस्थापित करें: सही, गुंजाइश: {बाजार: '@', बाजार नाम: '@', eventName: '@', कॉलबैक: '& amp; {Element.on ('click', function () {scope.callback ({name: scope.eve...

hadoop - TApplicationException: Required field 'client_protocol' is unset -

I am developing a savings client, I have a thrivate hive server (apache-hive- 0kl4k0) on my machine and I can also use Cloidera Dist Acvev 4.6.0 is when I connect Seediac client Throft client, then you may receive the following error: TApplicationException: Required field 'client_protocol' is unset! Structure: TOpenSessionReq (client_protocol: null, username: I'm passing the correct protocol on the server but it seems that some things doing this ride .... In addition to this, if I point to the local host (where I have a hive server running) everything works fine .... Please tell me what is wrong here .... code: var socket = new TSKet ("XXX.XXX.XXX. XXX ", 10000); TST StreetTontor T STransport = (TstreamTransport) socket; var transport = new Tibufrendtronsport (socket); Antrnihittronsport = transport; Vert Protot = new Tibiriprotokl (transport); var client = new Tisielaisis. Client (Protota); transport. Open (); TOpenSessionReq req = new TOpe...

osx - phonegap - trying a simple helloworld I get just a black screen on iOS emulator -

I'm following this padding: So when I try cordova emulate ios this ** Build SUCCEEDED ** displays, but iOS simulator always shows a black screen, and after a few minutes it prints: session could not be started: error domain = DTiPhoneSimulatorErrorDomain code = 2 "Simulator session has expired." UserInfo = 0x7fe1b3f31f00 {NSLocalizedDescription = simulator session times.} Error: / Users / me / Desktop / TestAppIos / platforms / IOS / Cordoba / Run command ChildProcess.whenDone (/ usr / local / lib / node_modules exit code 1 with failed /cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) ChildProcess.emit (on events.js: 98: 17) maybeClose (on child_process.js: 755: 16) Process. On ChildProcess. _handle.onexit (child_process.js: 822: 5) I'm MacBook Retina 13 "with the Mavericks Any idea I'm just trying. ? creating a HelloWorld and Android and simulation on iOS. this error has reported several times on stack overflow is. ea...

vba - If, Then, Duplicate Excel Formula -

Column "A" is a number column for each line, some numbers are identical, i.e. .. A1 is 1a2 is 3a3 is 1 a4 is 3 I need a formula that will show how many cells with the content in the column without computing the duplicates, as above 2 Will happen. Is there a "if-then" formula but is unable to get it directly any help there? Thank you in advance! If you are using Excel 2013, then I want to say that a count is specific Regardless of this, you can do it like this: = SUM (IF (Frequency (A1: A4, A1: A4)> 0,1) Edit: Adding an explanation > > by using values ​​within AW: A4 > (second parameter) If checks to see if anything returns, i.e. frequency If it is more than 0, then in that case it gives 1 for each unique value, which it finds. Then by adding the number of 1s back to the SUM , if statement, in return you give the number of unique values ​​within the array A1: A4 .

php - Change url referrer to look like comming from facebook using a redirect url -

I have created a PDF eBook where I added a link to the uploaded YouTube video. Statistics on YouTube, indicating that my traffic source is unknown. I know that this is affecting the SEO of my video. That's why I'm trying to increase my YouTube SEO, which looks like visitors coming from my PDF to Facebook. I know that this is making referrals but I do not know that it can be done like this: 1 _ Click the embed link in the user's PDF. 2 _ Users are redirected to "myscript.com". 3 _ "myscript.com" will redirect the user to YouTube. 4_YouTube statistics show traffic coming from Facebook. Please, if you know something about it, help me It is not possible that you can duplicate the referrer in your browser, but you can use any other browser You can not force them to make fake. What is your solution, it shows the referrer as your own website, it can still be better than it appears from anywhere. But, on the other hand, it can not happ...

C# How to create a generic list of students and grades and access those -

I'm struggling with something on C # which should be really easy for me in an unknown number of students Storage system is needed and unknown number of features about each student are required. I am basically finding an unknown number of students, grades and other information which is different from any other student. Student 1: Name: John Last Name: DOE Math 1010: A Math 2020: B Math 3010: B + England 1010: A - Student 2: name: April: last name: Johnson Geology 1000: C. Math 1010: b etc. ... Finally, let me each student Need to take steps through and produce your information. I found this example which is good for a set of known items per student, but I think that I need a list for each student, and I'm not sure that the "master" list How to make it I can understand it for arrays, but the working generator is new to me. list & lt; Students & gt; LstStudents = New list & lt; Students & gt; (); Student objStudent = new student (); Obj...

javascript - Controller returns plain json data instead of staying on page -

I am trying to request an AJAX request to return the search results. When I submit a search, my Jason data comes back to my white black and white page. How do I keep it on page and exclude the rest of JavaScript? I suspect that the problem is either event.preventDefault is not working properly or the code return in the controller is preventing anything from happening. Here are my code snippets: HTML & lt; Div id = "contactform" & gt; & Lt; P & gt; Search for contacts & lt; / P & gt; {{Form :: open (array ('route' = & gt; 'contact.results', 'method' = & gt; 'post', 'id' => 'contactsearchform'))}} {{form :: text ('Contactsearch', null, array ('id' = & gt; 'contactsearch', 'placeholder' = & gt; 'name'))}} & lt; Button type = "submit" & gt; Search & lt; / Button & gt; {{Form :: off ()}} & lt; / Div & ...

How to define a rectangle with a circle at the end using Android XML definitions -

Image
क्या निम्न चित्र पर दिखने वाली आकृति को परिभाषित करना संभव है: मैंने एक परत सूची की कोशिश की, लेकिन मुझे इसके समाधान के करीब नहीं मिल सका है कि मैं क्या मैं परिणामी आकृति को पृष्ठभूमि छवि के रूप में एक रिलेशनल लेआउट को पारदर्शिता के साथ उपयोग करना चाहता हूं। कोई संकेत की सराहना की जाती है! धन्यवाद। यहां आपके द्वारा पूछे गये आकार है: & Lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8"? & Gt; & Lt; परत-सूची xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & LT; आइटम & gt; & Lt; आकार एंड्रॉइड: आकृति = "आयत" & gt; & Lt; आकार एंड्रॉइड: width = "250dp" एंड्रॉइड: height = "100dp" / & gt; & Lt; ठोस एंड्रॉइड: color = "# ffffff" / & gt; & Lt; / आकार & gt; & Lt; / मद & gt; & Lt; आइटम एंड्रॉइड: शीर्ष = "0dp" & gt; & Lt; आकार एंड्रॉइड: आकृति = "पंक्ति" & gt; & Lt; स्ट्रोक एंड्रॉइड: width = ...

Replacing empty values with a default value in a Linq to Entities query -

The links below will have a default value in the value given below in the entity query in x.Number if the query 0 office telephone objects Returns i x Have tried number ?? "555-1212" but there is an error in it. From the contacts. Where (a = & gt; a.ListName.Contains ("ANDUS")). (10) Select new (id = ciid, officetailfone = c. Telephone where (a => gt; telephone type .name is included ("office")). (X => New {x} .AreaCode, x.Number, x.TelephoneType, x.Primary})} I have tried to do something like this: from contact C where (a = & gt; a.ListName.Contains ("ANDUS")). (10) Select new {id = cid, office telephone = c. Cellphone where (a = & gt; one telephone type .name Select (x = & gt; New {x.AreaCode, x.Number, x.TelephoneType, x.Primary}). Defaulge ("Office"). I'm not sure how to push a default object in 'DefaultIFEmpty () Use DefaultIfEmpty and pass a default installation with those basic va...

c++ - MIDL changes the Interface name -

मेरे पास एक कॉम डीएलएल है, जो कॉम इंटरऑप का प्रयोग करते हुए एनएटी अनुप्रयोगों द्वारा उपयोग किया जाता है। CoClasses में से एक में, वहाँ एक अंतरफलक IT6TrackData कहा जाता है और यह एक TrackData आईडीएल फ़ाइल से बुलाया संपत्ति प्राप्त होते हैं: इंटरफ़ेस IT6TrackData {[propget, आईडी ( 1)] HRESULT ट्रैकडेटा ([आउट, रिटावल] सेफ़र्रे (बाइट) * पीवीएल); } जब टीएलबी फ़ाइल को ऊपर आईडीएल फ़ाइल के लिए देखा जाता है, यह संपत्ति को ट्रैकडेटा (कम केस में टी) के रूप में दिखाता है कुछ कारण से क्लाइंट अनुप्रयोग इस गुण को ट्रैकडेटा के रूप में संदर्भ दे रहा था इंटरफ़ेस IT6TrackData {[propget, id (1)] HRESULT: ट्रैकडेटा ([आउट, रेटवाल] सेफ़र्रे (बाइट) * पीवीएल); [प्रॉपट्यूट, आईडी (1)] हेरेसल्ट ट्रैकडाटा (SAFEARRAY (BYTE) पीवीएल में); } अब जब टीएलबी फ़ाइल को ऊपर आईडीएल फाइल के लिए देखा जाता है, तो यह संपत्ति को ट्रैकडेटा (टी ऊपरी मामले में) के रूप में दिखाती है, यह पुराना। नेट क्लाइंट को तोड़ रहा है जो "डेटा" के साथ ट्रैकडेटा को देखें निचले मामले में। मैं इस KB लेख के माध्यम से चले...

VBA - Calling a function to return boolean to check if file exists -

I am writing to write a VBA program whether a function is present through the function that returns the boolean However, I have a problem with the "file = filesexists (strandtfile name, strodet path)" line, VBA states that due to the mismatch of the problem type I really do not know how to fix it. Please help people ps sorry code maybe a bit messy as I am doing an amateur in VBA programming function fileexists (ByVal sPathName string, as the alternative directory boolean form In), start the error on Boolean as next, then sPathName & lt; & Gt; "" Then the fileexists = (Dir $ (sPathName, vbDirectory) "> then" IsMissing (Directory) or Directory = false then fileexists = (Dir $ (sPathName) ) Finally if end end function sub ah () const strDataPath string = as "c: \ users \" retard string strFileName string as strdatafileName as string dim file boolean dim wbNew as workbook strDataFileName = "past Data "file = fileexists...

python - transform an array of array to an array of numbers -

I have an array of values ​​and repeatedly an array of & gt; & Gt; & Gt; X = NP. Color (5)> gt; & Gt; & Gt; X array ([0, 1, 2, 3, 4]) & gt; & Gt; & Gt; N = np.random.randint (1,3,5)> & Gt; & Gt; N array ([2, 1, 1, 2, 2]) and I gt; & Gt; Y = np.array ([np.repeat (x [i], n [i]) for category (5)])> gt; & Gt; & Gt; Array ([0, 0]), array ([1]), array ([2]), array ([3, 3]), array ([4, 4]), dtype = object) But I want to have my result array ([0, 0, 1, 2, 3, 3, 4, 4]). How can I do this? I think it's easier than you are making: & gt; & Gt; & Gt; X = NP. Color (5)> gt; & Gt; & Gt; Y = np.array ([2, 1, 1, 2, 2]) & gt; & Gt; & Gt; Np.repeat array (x, y) ([0, 0, 1, 2, 3, 3, 4, 4])

Python - SSLSocket.recv() only returns a single byte -

I'm trying to add SSL support for my program. Now I am going to read from that socket ... Try: Data = sslsock .recv (4096) E: # Error except socket.error .. Why do I get only one byte? I know that more than 1 byte is available. When I use it instead ... data = '' while 1: try: data + = self.sock .recv (4096) Except socket.error as e: if data: brake ba: # error ... The entire string of bytes has been returned before using Wrap_socket, the entire string of bytes Always recv is returned from the call. socket .recv actually only recv (2) recv (2) from the man page: Instead of waiting for the receipt of the full amount requested, received call Normally return any data available up to the requested amount.

mysql - How to use unsigned int / long types with Entity Framework? -

with long form data types are mapped correctly when adding a new migration (Code-before), but the Ulm data types are omitted by the eF provider of mysql how a ? mappings a property to use that entity framework unsigned Does not support data types For the uint column, any one can store the value in a signed data type with a large range (i.e., a long ) is. About ulong column? The general solution could not work for me because there is no EF-supported signature data type that can hold inverted code without any overflow. After a little bit of thinking, I thought an easy solution to this problem: simply enter the data in the supported long type and if it is accessed then ulong Enter . You might have been thinking: "But wait, Ulong's maximum value & gt; maximum value for long!" You can still store a Ulux bytes in the long run, and then when you need it, revert it, as both of them have 8 bytes. It allows you to save a vulgar variable for a database...

mysql - Server hangs all requests after a while -

Our Rail 4.0 4.0 application (Ruby 2.1.2) is running on NGNX with Pum 2.9.0. I have recently seen that all requests for our application hang up after a while (usually 1 or 2 days) while examining logs, which are Debug is set to mode, I saw the following log stack: [2014-10-11T00: 02: 31.727382 # 23458] Info -: for "/" start It has been done ... This means that the requests have actually been hit on the rail app but in some way it is not going to increase further, it will usually be: i, [2014-10-11T00: 02: 31.727382 # 23458] For information -: Get "/" .... I, [2014-10-11T00: 02: 31.72 9393 # 23458] Notice - My Puma config is as follows: Formula 16, 32 Worker 4 P> Our application is only for internal use, so the RPM is very low, and no request takes more than 2s. What is the reason that can cause this problem? (Puma config, database connection, etc.) Thank you in advance. UPDATE: After installing Mani rack_timer to log the time spe...

mysql - Pushing Data from Local Rails App up to Elastic Beanstalk -

My local Mac OSX is a railing app working on the environment that works with the local PostGraz database. I have been able to get a sample app and work on EBS, including Puma and MyScall. I think that raising the code is a matter of using "GIT A VS Peash" - but what I have to do to further the data on EBS environment (I'm happy to use PG or ISSL on EBS - But I'm guessing PG that this is a better option than what the local app uses - if so, then I would have to configure my database for PG on EBS. How to configure an IMML ?) In short: How do I define and create database on EBS? How do I get Rake DB equivalent: Migrate to EBS environment? How do I push data into tables up to EBS? I can not answer your question about installing the database on EBS, But you do not want to straighten your database files straight away if you want to populate some data in your Rail app database, then you should make that part of your app. . If this is not an option for s...

websocket - setting soket.io transports client-side -

In socket.io v0.9, I can set up available transport in my Javascript client (in the browser) so that: io.transports = ["xhr-polling", "jsonp-polling"] How do I do the same thing in socket. O 1.0? Worked here: socket = io.connect ( "Http: //www.example.com", {transports: ['polling']})

vim plugin - Output of programs in vim using SingleCompile -

अगर मैं : SCCompileRun को एक फ़ाइल पर # शामिल करें & lt; stdio.h & gt; मुख्य () {char s [100]; Printf ("एस \ n" में स्टोर करने के लिए कुछ पाठ दर्ज करें); Scanf ("% s", s); Printf ("\ n% s \ n", s); वापसी ; } मुझे एक आउटपुट जैसा मिलता है: abc को जारी रखने के लिए एंटर दबाएं या कमांड टाइप करें abc में स्टोर करने के लिए कुछ टेक्स्ट दर्ज करें एंटर दबाएं या कमांड को टाइप करें जारी रखें मुझे पूरा कोड चलाने के बाद में संग्रहीत करने के लिए कुछ पाठ दर्ज करें । क्या यह प्रोग्राम के आउटपुट को प्राप्त करना संभव है क्योंकि इसे कार्यान्वित किया जाता है? प्रति @ फ़िडीफॉफ, फ्ल्ल्ज (stdout ) काम किया।

Angularjs routeProvider adds *?* or %3F to URL with optional parameter -

I am trying to understand why ? I have an optional parameter in the or % 3F URL $ route provider. When ('/: Locale? /', {TemplateUrl: '/views/index.html', Controller: 'myController', Title: 'Title'}). Otherwise ({redirectTo: '/'}); // html5mode $ locationProvider.html5Mode (true); $ LocationProvider.hashPrefix ('!'); will end with the URL I'm not sure what other information is that to help me get the right answer Should provide me, but please tell me. $ route provider and routing Does not work with me, and I think the angle thinks that you are trying to experiment them, but rather define the alternative parameter I do not think you have to give your alternative parameters your way Are correctly defined in I belive that you need to do it this way: $ routePro Vider When ('/: Locale?', {TemplateUrl: '/views/index.html', Controller: 'myController', Title: 'Title'}). Otherwi...

java - Stream of boolean values, is any true? -

I want to parallel the code given below using parallel stream: Boolean anyTrue () {For (Element E: set off) {if (eval (e)) {Back true; } } return false; } Will the following tasks and regular short-circuit evaluation be used on parallel streams? setOfE.parallelStream (). Map (e -> gt; eval (e)). Less (false, (A, B) -> A ) The Stream API is actually the first class support for your requirement: setOfE.parallelStream (). Any match (e-> eval (e)); Unlike your approach with reduce , short-circuit evaluation and compatibility is guaranteed to be equally leverage.

f# - Type inference wants explicit upcast sometimes even when flexible type is used for interface constraints? -

I hoped that the flexible type would reduce the need for explicit exception, but IB = Sulfur B: Int Type A () = Interface with IB member. B = 1 Let's do a = A () Let's test (x) = let's aa = [| A; One |] Let's Cause 1 = AA | & Gt; Array.map (fun (x: #IiB) - & gt; Test (xb)) Case 2 = Array.map (Fun (X: #IB) -> Test (xb)) A Here, the warnings on the last 2 lines (less generic than type annotations) are compiling the compiler case2 , but fails in case1 Why is it like this? It seems weird that a more detailed compiler can guess, I need more code to write. @KVB said that there is a simple fix, just to refurbish the lambda function in a non inline version. X: # IB) = test xB give case1 = aa | & Gt; Set Array.map case2 = Array.map fix This works well. Type the estimate in the F # flux from left to right, so it is not surprising that piping Can break or cure. However, this is almost always the case that more types of information are alr...

PHP reverse the order of sub array -

यहां एक सरणी उदाहरण है I। Array ([0] = & gt; Array ([0] = & gt; एक [1] = & gt; बी [2] = & gt; c)) मुझे उलट करने के लिए उप सरणी के आदेश की आवश्यकता है। मुझे पता है कि फ़ंक्शन जिसका मुझे उपयोग करना है "रिवर्स_अरे" है, लेकिन मुझे पता नहीं है कि उसे सरणी में कैसे सरेंडर करना है। आप उपयोग करने के लिए आवश्यक फ़ंक्शन है, लेकिन मैं मान रहा हूँ कि वह एक है जिसकी आप बात कर रहे थे। अपने प्रश्न का उत्तर देने के लिए, आप मुख्य सरणी के बजाय सरणी वस्तु को निर्दिष्ट करें: $ array [0] = array_reverse ($ array [0]); // ^ ^ यदि आप किसी ऐरे में सभी उप-सरणियों को उलट करना चाहते हैं, तो आप इसका उपयोग कर सकते हैं: $ array = array_map ('Array_reverse', $ सरणी);

wordpress - woocommerce search only parent category products based on body class -

I am using the code given below but I'm not sure how to add it to two different search forms The categories of products that only parents search in. Either product_parent_cat_floral or product_parent_cat_rentals & lt; Php $ classes = get_body_class (); If (in_array ('product_parent_cat_rentals', $ square)) {? & Gt; // Rent search form goes here & lt ;? Php} else {? & Gt; // flower search form goes here & lt ;? Php}? & Gt; Can I search this search form anyway in the Apprentice Parent class? & lt; Form role = "search" method = "get" id = "search form" = "http://botanicaevents.com/rentals/" & gt; & Lt; Div & gt; & Lt; = "S" for label class = "screen-reader-text" & gt; Search for: & lt; / Label & gt; & Lt; Input type = "text" value = "" name = "s" id = "s" placeholder = "search for products" / ...

import - Missing dll function detection -

I want to ask if there is no way to detect missing functions in the DLLs included in my application, while the application is running . I know about the possibility of manually importing the function using HMODLL and checking this function while calling, but I do not want to solve every function call like this. Idea function calls to cover with some effort-cal block or something similar, which is not the cause of the app crash. Any solutions? Thank you. You can try to call the function, which will generate a function EntryPointNotFoundException if the function exists is not . For example (VB.NET): Blind Random Function - Try the Function () View System. >

Can't select from dropdown with jQuery on iPad -

I have a jQuery function that finds an element from its value in a HTML selection menu and chooses it () : $ (function () {var select = $ ("# selectElement"); var option = $ ("# select element option:" (SERV ')); option.attr ("Selected", "selected") option, bibiling ('option'), deleted etter ('selected'); select transger ("change"); warning ($ ("#selected element: selected") .text ());}); HTML: data-theme = "a" data-overlay-theme = "b "D Select Ta-Mini = "Right" Data -Defining-Menu = "True" Data-Shadow = "False" ID = "Selection Element" & gt; Option ID = "O1" value = "o1v" & gt; ; Null & lt; / option & gt; Option ID = "O2" value = "o2v" & gt; MAIN & lt; / option & gt; Option ID = "O3" value = " O3v "> MN VL gt; option id =" o 4 "value ...

UITableView with JSON Error -

The one app I have is using JSON and UITableView. when I try to make your app / run, it says: not known class method selector 'JSONRequestOperationWithRequest: Success: Failure This is my code : Error 48 is on error Greetings Rick It looks like an older representatives on the new version of the API are trying to: a content negotiations and its new structure for the serialization of the most important changes in the AF 2.0. First, response validation and serialization was handed with Afactiteepiariakvest Oprekshn and its subclasses, including set-Kanplimentblokvithswvs failure and the material-specific logic with the specific material applied to other properties. In 2.0, all of this logic is explained in a serializer object that corresponds to AFURLResponseSerialization .

How can I format a txt file in python so that extra paragraph lines are removed as well as extra blank spaces? -

I'm trying to format a file like this: (random.txt) How to look below: (randomoutput.txt) Hi, I am trying to format a new txt document That extra space between words and paragraphs is only 1. It should show this txt document: So far the code I've managed has removed the empty space, but I have difficulty in recognizing where the new paragraph starts, which does not leave empty lines between the paragraphs, this is what I have done so far. DIF RipplesSpace (input, output ): Ivar = open (Input, 'r') over = open (output, 'w') read n = ivar () ovar.write (''. Add (n.split ()) ivar.close () ovar.close () Edit: I create an empty space between paragraphs The path is also found, but now it breaks every line and creates a place between the old line and the new line: m = ivar.readlines () m [:] = [ If i am in i! = '\ N'] ovar.write ('\ n'.join (m)) You should process the input line through the line not only will simpl...

mysql - I need to find any 5 rows that match where clause and they occur "in a row" (they are neighbors) -

I have a MySQL table for an imaginary fitness app Assume that the focus on pushing the user from day-to-day Is giving up. Training day id | ID_User | Date | Now, I have to figure out that the user has ever managed to do more than 5 pushups for 5 days in line. I know that this is probably worth bringing by all days and then making some php loops, but I wonder if this is likely to be done in plain mysql ... Select / p> grp, count (*) from numdaysinarow (select (interval-interval day) as grp, select td. * (TD. *) , (@ RN: = if (@E = ID_user, @ RN + 1 if (@I: = ID_User, 1, 1)) Training Day TN Cross Join (@ RN: = 0, @) from RN I: = null) vars where number_of_pushups> date = 100 id_user, td) td group grp; This observation uses that when you decrease the sequence of numbers from one To determine whether there are 5 or more days in the row, maximum () : Select grp, count (*) to numdaysinarow (select (date - a Intermittent RN day), as the grp, td * To join tra...