Posts

Showing posts from January, 2011

sql - How to query a table where data will be use as column name/field name -

मेरे पास यह तालिका है: AMTo PMFROM PMTo से दिन AMFrom ----- -------------------------------------------------- ------------- सोमवार 09:00 अशक्त नल 06:00 मंगलवार 09:00 नल नल 06:00 बुधवार 09:00 नल नल 06:00 गुरुवार 09:00 नल नल 06:00 शुक्रवार 09:00 नल नल 06:00 शनिवार 08:00 नल नल 05:00 शुक्रवार 08:00 नल नल 06:00 इस तरह की आउटपुट के लिए मैं इस तालिका को कैसे पूछ सकता हूँ: सोमवार सोमवार से सोमवार सोमवार से सोमवार तक पीएम टू ------------------------------------ -------------------------------------- 09:00 नल नल 06:00 आउटपुट में मंगलवारएमएमएफआरएम, मंगलवार पीएमटीओ, .......... रविवार पीएम भी शामिल है। मैंने संक्षेप के लिए स्कीमा को सरलीकृत किया है लेकिन इसे आपके स्कीमा के साथ भी लागू किया जा सकता है: टेबल टीबीएल (दिन के वार्चार (20) बनाओ, Amfrom int, amto int); टीबीएल मूल्यों में डालें ('सोमवार', 9, शून्य); टीबीएल मूल्यों में डालें ('मंगलवार', 10, 11); MondayAmFrom, MondayAmTo, TuesdayAmFrom, TuesdayAmTo चयन से (amto MondayAmTo रूप amfrom MondayAmFrom के

c - How to prevent GCC from optimizing out a busy wait loop? -

I want to write C code firmware for Atmel AVR microcontrollers. I will compile it through GCC. Also, I want to enable compiler optimization ( -Os or -O2 ), because I do not see any reason not to enable them, and they Possibly a better assembly method will generate faster than manually writing the assembly But I do not want to customize a small piece of code. I have been delaying execution of a function for some time, and in this way I wanted to write a do-not-loop for a while. There is no need to be accurate, just wait for some time. / * How to optimize other code while not optimizing? * / Unsigned char i, j; j = 0; While (-J) {i = 0; while I); } Since memory access to AVR is very slow, so I want the i and j to be placed in the CPU registers. UPDATE: I could get a better idea to use those functions, however, this question became valid and interesting even though I got more from it. The document mentions the GCC: noinline This function attributes preven

php - Zend Paginator: Load each page from Database with Limit and Offset -

I'm using the following code to score on the page I get the database result 10 Receiving, P> $ result = $ model-> Search (); // SQL Limit 10 $ pgenerator = Zend_Paginator :: factory ($ result ['listing']); $ Paginator- & gt; SetItemCountPerPage (10); $ Paginator- & gt; SetCurrentPageNumber ($ page); $ This- & gt; View- & gt; Pageinator = $ paginator; I have around 10,000 records in the database and I am trying to get 10 results for each database request and display. But for endorsement here, we need to get all the results and need to pass the Zand penguin, which causes a performance problem. So how do I get 10 results per page using the SQL offset and 1,10 ... 11,10 ... 21,10 like I clicked the 2 page to offset the database You must get the results from and 11,10 as limitations and I need to bring dynamically each page result from the database. How is it possible? Can you try Pagination url on my page: $ SetItemCount = 10; $

sql - MySQL query error with a table named "order" -

I have this problem but I have just got the solution, so I will write it here if anyone stays in it. This is my mysql query: mysql_query ("Choose ID from order order by id DESC LIMIT 1") and I got the error There is an error in your SQL syntax; The order related to your messaging server version for the right syntax to use the order order 'ORDER ID DESC limit 1' on Order The word is reserved You must use the command to join the back-tiex. / Strong>

string - C++ pig latin translator -

im writes a program in C ++ which translates the pig into Latin, taking only the first letter of the word And by adding this to the end and adding "AE" example to the end, "Hello World" becomes "Elo Waldwe", but this is not working, ive tried in several different ways, whoever did no work About to leave at this point, please someone can help me do this okay. #include "stdafx.h" #include & lt; Iostream & gt; #include & lt; String & gt; using namespace std; Zero separator (four []); Int main () {string input; Const int size = 40; Sent four [SIZE]; Cout & lt; & Lt; "Enter the sentence" & lt; & Lt; Endl; Cin & gt; & Gt; Input; cin.getline (Sent, Size); Separator (Shipped); Cout & lt; & Lt; Input & lt; & Lt; Endl; System ("pause"); Return 0; } Zero separator (four input []) {int count = 0; Char x; While (input [count]! = '\ 0') count ++; If (islfa (input [count]

libsvm - Two functions with same name in Matlab -

I am using libsvm in matlab and I am trying to call svmtrain I am However I know that Matlab also has an embedded function named svmtrain . I believe that they take the same parameters in different order. How do I know which function is calling me? I want to call the svmtrain function from libsvm How can I ensure this? If you have two functions with the same name, then the matlab which is in your PATH . Therefore, it may be the case that if you call svmtrain with different instructions, you can call different functions, even if you have the sole one The change is changing your current working directory. To know which function is actually using, call the function from the command line: & gt; & Gt; Svmtrain

mysql - Is there a way to select a certain number of row for a certain column? -

मेरे पास यह तालिका है: + ---- + ----- ---- + ---------- + ------- + | आईडी | User_id | अन्य_आईडी | स्कोर | + ---- + --------- + ---------- + ------- + | 1 | 1 | 1 | 80 | | 2 | 1 | 2 | 40 | | 3 | 1 | 3 | 60 | | 4 | 2 | 2 | 70 | | 5 | 2 | 4 | 50 | | 6 | 2 | 3 | 40 | | 7 | 2 | 5 | 90 | + ---- + --------- + ---------- + ------- + मैं सॉर्ट करना चाहता हूं प्रत्येक user_id द्वारा स्कोर और प्रत्येक user_id के लिए अधिकतम n (जैसे, 2) पंक्तियां लौटाएं। इसलिए मैं परिणाम को प्राप्त करना चाहता हूं: + --- --- --- --- + ---- + | 1 | 1 | 1 | 80 | | 3 | 1 | 3 | 60 | | 7 | 2 | 5 | 90 | | 4 | 2 | 2 | 70 | + --- --- --- ----- ---- + इसे आसानी से एक सबसेल का उपयोग करके, एक ही तालिका के साथ गिनती की तुलना करके किया जा सकता है SELECT * FROM Table1 t (SELECT COUNT (*) से Table1 t1 WHERE t1.user_id = t.user_id और t1.score & gt; = t.score) & lt; = 2 ORDER BY t.user_id एएससी, टीसीओसीकोर DESC

sql - How to do nested sorting within dense_rank -

Image
I used the dense rank to group items in the table in a 3-day bucket. Example: April 22-24 will be 'tight' together and will be handed over to priority 4. Question: I need to do more sorting on plan_package based on QTYORDERED. I have the last result given below for priority 4 I use SQL as the sorting below. Anybody can help on the schematic package and sorting ??? ** ** Select SALESORDERID, ITEM, PLANNING_PACKAGE, GENERIC_PACKAGE, QTYORDERED, DMD_TYPE_CD, ORDER_TYPE_CD, PRIORITY_NBR, PROMISEDAVAILDATE, dense_rank () over (sequence by round ((when case dmd_type_cd = 'Netted Forecasting 'is the biggest (ProAcAdAVATAAT, (DADT ('22-AP-14', 'DD-MN-YY') + 31) and ends the gap of futures - (to_date ('22 -Apr-14 ',' DD-MON-YY ') + 1)) / 3, 0) TEST_SALESORDER_TABLE as priority; You can specify multiple columns to sort by order in the section - In your case this will be done .... order from priority, qtyordered desc if

python - How do I go to the first record of a CSV file within the same "for" loop? -

I asked a similar question and the answer I get is seek () the way. Now I am doing the following: Input as Open ("total.csv", 'rb') 1: time.sleep (3) input1.seek (0) reader = csv For the line in the reader: reader (input 1, delimiter = "\ t"): read the CSV row by # line However, I have CSV within the same for the loop < I want to navigate the first record of / strong>. I know that my loop will not end those methods, but it's fine what I want. I do not think the for loop ends and if it reaches the final record, then I want to navigate the first record and read the whole file again (and read it). How do I do that? Thank you! For simplicity, create the generator: def repe_reader (Input , Reader): While correct: input.seek (0) for the line in the reader: output row with open ("total.csv", 'rb') as input 1: reader = csv.reader (input 1, delimiter = "\ t") is repeated (Input 1, Reader): Read the CSV ro

php - Placement of conditional script in head section of a layout -

In my layout I am using a bunch of JavaScript scripts. Two of these scripts are conditional and they should be loaded for IE9 only. And everyone else should be loaded for all browsers. To achieve this, I have done the following in my bootstrap class. $ this-> Headset () - & gt; Append file ('//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js', 'text / javascript', array ('conditional' => 'LT IE9')); $ This- & gt; _view-> Headset () - & gt; Append file ('//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js', 'text / javascript', array ('conditional' => 'LT IE9')) ; $ This- & gt; _view-> Headset () - & gt; Attachment file ($ this-> _view- & gt; Baseput ('/assets/js/scripts.min.js?ver=1.0.0')); This works and I get the output in my layout. & lt ;! - [If Lieutenant IE 9] & gt; & Lt; Script type = "text / javascript" src = "// oss.maxcd

google maps - PHP - Get Latitude & Longitude from an address -

I have used autocomplete of geocode, but when I am selecting from the drop down, it gives me latitude and I am going to know when latitude and long term are empty, then I should get latitude and longitude from the postal address Assume that you have hidden values ​​for latitude and long map halts & amp; mapLong and input field namespace, you can check the following & lt; Html & gt; & Lt; Form & gt; & Lt; Input type = "hidden" name = "maplate" & gt; & Lt; Input type = "hidden" name = "map" & gt; & Lt; Input type = "text" name = "location" & gt; & Lt; Input type = "submit" name = "submit" value = "submit" & gt; & Lt; / Form & gt; & Lt; / Html & gt; Extact ($ _post); If you lie long ($ mapLat == '' & amp; $ mapLong == '') {// Google $ latlong = get_lat_long ($ location); // $ below map = explosion (

mysql - How can I fix java.sql.BatchUpdateException? -

I am writing a java program that joins mysql db to jdbc.It includes the record to mysql i sq Here is: INSERT ('AMERICAN', '97', '1998-08-28 00:00:00', '10', '1995- 08' in my_schema.my_table VALUES: my_schema.my_table -28 00:00:00 ',' 10 ',' United States Dollar ',' US Dollar ',' $ ',' 2 ',' Y ',' Y ',' 1998-08-28 00: 00: 00 ',' _6064530F8DBAB938E040007F010015E3 '); but it returns this error: e = (java.sql.BatchUpdateException) java.sql.BatchUpdateException: there is an error in your SQL syntax ; Use your MySQL server version for the correct syntax to use 'nearby' ('AMERICAN', '40', '1998-08-28 00:00:00', '10', '1998-08-28 Check the manual related to 00:00:00 ',' 10 ',' H 'on line 1 But the strange thing is: I insert it manually without any errors Thanks Advance, It's weird but it wo

jquery - How to make a wrapper function in javascript? -

I have a very low click handler: $ (document) .on (' Click ',' .xxxbtn ', function (e) {....}) I want to save one of the cookies in some of them. I can write down like this: function default handler (e, callback) {callback (e); DoSomeJobs (); } $ (Document) .on ('click', '.xxxbtn', defaultHandler (e, function (e) {`different code in each BTN .... ....}) But I think it should be handled well ( just look better and clear ): $ (document) .on ( 'Click', ' update m Maybe my example is a bit unclear. I mean if i can create defaultHandler as function statement in javascript? Just function << Text "itemprop =" text "> short answser : No, there is no way to say defaultHandler (e) {...} < Long answer : It is possible to achieve something like this: order functions, functions which return the function ns. Yes In JS, such a thing is possible, and even clean, short codes are requi

android - Flip horizontally like flipboard with MuPDF -

मैंने MuPDf एंड्रॉइड को खोलें , पीडीएफ के लिए> देखें , खोज , बुकमार्क सेटिंग आदि। अब मुझे क्षैतिज फ्लिप के एनीमेशन प्रभाव चाहिए, जैसे कि फ्लिपबोर्ड एप्लिकेशन में क्षैतिज ढंग से इस्तेमाल किए जाने के समान। मुझे यह भी पता होना चाहिए कि खोज टेक्स्ट कैसे उजागर कर सकता हूं I मैं उपयोग कर रहा हूँ मैं लिंक के माध्यम से चले गए हैं जैसे: कृपया मदद करें मुझे यह भी पता होना चाहिए कि खोज टेक्स्ट कैसे उजागर कर सकता हूं I MuPDF का PageView.java: निजी स्थिर अंतिम पूर्णांक HIGHLIGHT_COLOR = 0x802572AC; // रंग को समायोजित करें ... // कुछ पेज के पेज विव.जावा सार्वजनिक शून्य सेटपेज (इंट पेज, पॉइंटफ साइज) {... // पेज पेज के दृश्य .सेटपेज (इंट पेज, पॉइंटफ़ साइज़) // यह हिस्सा है जहां हाइटलाइटिंग होता है, अगर (! एमआईएसब्लैंक एंड एमएस खोज बॉक्स! = नल) {paint.setColor (HIGHLIGHT_COLOR); के लिए (रीक्टफ रीक्स्ट: एमएसॉर्चब्लॉक्स) कैनवास डायरेक्ट रेक्ट (रीक्ट। लेफ्ट * स्केल, रीक्टीट। * स्केल, रीक्ट। राइट * स्केल, रीक्ट। बॉट्टम * स्केल, पेंट); // आप इसे अनुकूलित कर सकते हैं, उदा। //

oop - What category is repository pattern in? -

In general, I know there are 3 big categories of design method Creative Structural patterns (composite, adapter, proxy, etc.) P> But I do not know In which category I can put the repository pattern Is there one of the top three categories in the repository pattern? Or is it between (2) and (3) pattern? The stock can be seen as a specific type of awning (structural) But can also be seen as a special type of factory (crawl). Also, as the repository often exposes a collection-like interface, it can then be a special application of the iterator. What I am trying to say is that neither those categories nor the patterns themselves are of any type, certain principles are only a few ideas and a language that makes them appear more clearly Tries. These categories are just helpful, trying to express some type of pattern. Patterns also have different expressions of a common loose coupling principles. Their boundaries are blurry

SVG canvas too big, android default browser only -

Image
I have created a mobile website, which has a SVG file which functions as a fancy HR. We choose SVG because it is a good scales. It expects all (mobile) browsers, separate from Android's stock browser , which produces screenshots (all other browsers show only the green part of the screenshot, Designer saved this image with a full green background (select all, make green) I have CSS-ed like something : # wapar> IMG {background: red;} Android browse SVG is 100% screen height in R: If it helps, I have no clue what is looking for. SVG looks fine, other SVG always loads as expected, why does it make a different? "What have you tried?" No more than when I do not have any clue, I start. SVG saved Or (no effect) - CSS #wrap & gt; IMG (height: auto;} (no effect) - CSS #wrap & gt; IMG {max-height: 60px;} (#Wrap 60 makes height, SVG has been pushed together) - It was taken through the 'SVG Optimizer' (no change) < / P>

java - how to write in the database with the same persist order -

I have this code that I am creating: (int I = 0; I & lt; listofplusieurdrapage.size (); i ++) {continue (list Flalissepress.jet (I)); } I have two values ​​ litsofplusieurdrapage => litsofplusieurdrapage.get (0) = 1 = & gt; Litsofplusieurdrapage.get (1) = 2 But when I check the database, I found them in this order: 2 1 And when I add the code to just one system.out.println I get good command < Code> (int i = 0; i 1 2 Do you have an explanation of the problem? Adding system.out.println to your code Can I keep good order with my name? public zero existence (object object) {em.persist (object);} There is no command in the tables, for example and see other links. / P> If you have listofplusieurdrapage If you need to order, you must specify the order, for example see.

matlab - Plotting with transparency -

Image
I have to plot two forms below which overlap each other. How can I make the overlapping area transparent, so that the lower curve is visible? In the overlapping area, I can currently only see the top curve. x = 0: 0.01: 2 * pi; % # Starting x array y1 = sin (x); % # Create the first curve y2 = sin (x) + 5 % # Make another curve X = [X, flipple (x)]; To create plot% # create creative x value array = [or 1, flipple (y2)]; Make y value for # # outside and then fill back (X, Y, 'B'); % # Plot area% *************************************************************************************************** *****************% # Initial x array y1 = sin (2. * x); % # Create the first curve y2 = sin (2. * x) + 5 % # Make another curve X = [X, flipple (x)]; To create plot% # create creative x value array = [or 1, flipple (y2)]; Make y value for # # outside and then fill back (X, Y, 'B'); % # Plot filled area Change your last order Fill (X, Y, 'B'); with : h = fill (

mysql - Order by date time with AM PM -

I want to write a selected query with the order by datetime field. My date field is in the following format 2014-04-21 05:30 PM 2014-04-21 06:30 am 2014-04-21 10:30 am SELECT SELECT ORDER by STR_TO_DATE (`date_time`, '% h.% I% p') You need to save the date using the DATETIME format in the right format, Makes it easy. However, in your case you can do the form by SELECT * ORDER date_format (STR_TO_DATE (`date_time`, '% y-% m-% d% h:% i% p') ., '% Y-% m-% d% H:% i:% s');

php - MySQL - Count questionnaire answers. -

पृष्ठभूमि जानकारी मेरे पास निम्न तालिका संरचना है: प्रतिभागियों - आईडी, ईमेल, संगठन_प्रकाश_आईडी, नौकरी_ओल_आईडी उत्तर - आईडी, पार्टनर_आईड, प्रश्न_आईडी, उत्तर- प्रश्न, आईडी, प्रश्न, प्रश्न_गेंद दो अन्य तालिकाओं, संगठन प्रकार और नौकरी की भूमिकाएं हैं एक आईडी और एक नाम जो कि ऊपर की तालिकाओं में उल्लेखित है। तालिकाओं को जब कोई प्रश्नावली में भरता है तब से डेटा को पकड़ता है (प्रत्येक सवाल का जवाब हाँ या कोई जवाब नहीं) प्रत्येक प्रश्न भी दो श्रेणियों में से एक (question_category फ़ील्ड द्वारा निर्दिष्ट) में पड़ता है। जब कोई प्रश्नोत्तरी पूरा करता है, तो यह प्रतिभागियों तालिका में एक रिकॉर्ड बनाता है और प्रत्येक के लिए सवाल यह उत्तर तालिका में एक रिकार्ड बनाता है। समस्या मुझे हां जवाब और प्रत्येक प्रश्न के लिए कोई जवाब नहीं, उदाहरण के लिए, अगर मैं जानना चाहता हूं कि कितने लोगों ने हां वोट दिया और कितने वोट नहीं थे संगठन प्रकार x का हिस्सा, मुझे एक प्रश्न पूछना चाहिए: प्रत्येक प्रश्न के सभी उत्तरों की गणना करें, जहां प्रतिभागी का x का एक संगठन_प्रकार_आईडी है, उत्तर

javascript - Structurizing data in firebase -

Image
I have recently started using Firebase, however, since I'm not familiar with the NOSQL database, Having trouble doing this. I am developing a timesheet app, many users can input their start and end hours each day to work, and it will be saved in a database. At the moment, my firebase structure looks like this: Although there is some problem in accessing this data in my data, I do not think this is right. First of all, I just want to add a new entry under 'TileShit', whenever a user inputs, but obviously I do not want to add 2 entries for a single day to a user. I know that there are probably some complex ways to prevent the user from doing this, but I think it can be easily settled if I just saw how to make the best database for me Go. Later in the Loop, for a specific user to show all the days in the current month, every month in his / her closing hours for each day in the month. UPDATE: I was thinking about denormalizing my database, but could he really

html - PHP/XML - Fixing writing script -

im live, a new programmer and student, I'm currently following a short tutorial, reading an XML file I'm demonstrating this is one thing with PHP, which I want to do myself, in my PHP script, writing data in my PHP script, using a form in HTML, my script and form like this Looks like: & lt;? PP resonance ('script start'); /// To ensure that the script works only when ($ _SERVER ["REQUEST_METHOD"] == "POST") {echo ('-post accept'); // Load XML file variable $ xml = simplexml_load_file ("phptest3.xml"); Echo ('-XML Load'); // Convert Rupees $ name = $ _POST ['name']; $ Age = $ _POST ['age']; $ Sex = $ _POST ['gender']; $ Comment = $ _POST ['comment']; Echo ('-wars connect'); // XSS / Injections function is not necessary to prevent test_input ($ data) {$ data = trim ($ data) to bar those objects; $ Data = stripesal ($ data); $ Data = htmlspecialchars ($ data); $ Return data; Ec

date - convert from posix timestamp in %Y-%m-%d in R -

I have the date in this format: 1397758632 and I need to convert these formats into these dates% Y-% m-% d How can I do this? My timezone is GTM. Using the .POSIXct () function: as.POSIXct (x = "1397758632", original = "1960-01-01", tz = "GMT ") I have this error as error. POSIXlt.character (x, tz, ...): Character string is not in standard denial format How do I get a readable data? Some things if you defined a variable x = "1397758632" You do not need to declare it again, just use x for example, // as.POSIXct (x, origin = "1970-01-01" , tz = "GMT") 2, x = "1397758632" / code> is actually a variable variable, try str (x) You want to declare it numerically, x = 1397758632 and you're all good. Finally, to add as.Date () if you just want a date and do not stamp full time. Then something like this: x = 1397758632 POSIXct (x, origin = "1970-01-01", tz = "

java - how to highlight particular row in JSF datatable -

I'm new to JSF. I must know that in the JSF data-table, in a particular line or in a JSF data-table How to highlight a particular field. Please give me any solution. thank you in advanced. You can use conditionally colored colors using an EL expression like this styleclass = "# {Condition} 'old': 'new'}" .

c# - no suitable method found to override -

I probably checked through duplicates but could not find the answer I have an interface and interface There are 2 ways in Zero Triggers (IOrderBookDisplay Orderbook); Zero disposal (disposal of hair); I installed it directly in User Control 1 and I got this error UserControl1.Dispose (bool): No suitable method override found < p> I removed zero (disposal of bull); Away and I tried User Control 1: IControl, IDisposable and I got the same error I just had this problem, ask me how, but when I moved into the form of the form from the code load event of my code form, they went away.

windows - search for a folder buried in a folder and move the folder to a new destination -

I want to move the favorite folders from a folder that gets their code folder from every day to Appsense . The text between the quotation changes C: \ appsensevirtual \ S. 1-5-21-220523388-2000478354-839522115-60875 \ '{647CFC75-E4C0-4F13 - 9888-C37BA083416C} '\ _Microsoft Office 2010 I found this, but it is sometimes copied to H: (HomeDrive) Get-ChildItem "C: \ Appsensevirtual" -Riksha -Filter "Favorite *" - Directory | If I run it, then it is found in the PowerHell Administrator window (PowerShell 2) PSC: Move- item- Destination "H: \ Favorites" \ Temp & gt; . \ Favorites.ps1 Get-ChildItem: A parameter can not be found that the parameter name matches the 'directory' \ temporary \ favorites.ps1: 1 character at Celsius: 76 + Get-ChildItem "C: \ Appsensevirtual" -Recurse -Filter "Favorite *" -Directory & lt; & Lt; & Lt; & Lt; | -Destination- move items "H: \ Favorites" +

Android: get result from onPostexecute AsyncTask in service -

I am using asyncTask to download a file. AsynkTask in a service. I would like to download it, doing some years with the data received from OnPostexecute of AsynkTask. I can see the data from logs, onPostexecute, but I could not get it in the service. I saw many responses but did not work for me, I hope someone will provide me the solution. Thank you in advance. I started the service with main activity. ** Edit 3 * Now there is no exception, I've added the reference to the new DownloadFileFromURL (this) .execute (file_url); This code is now working. After editing, I am performing an executable I am using this code: This service: Public Class DownloadService service applies OnTaskCompleted {// file URL to private string file_url = "http://192.168.1.150: 8080 / TestAndroid / DownloadServlet / Desert.jpg"; Public Ink on Start Commands (Intent Intent, Int Flag, Interest StartID) {int rssi1 = intent.getIntExtra ("key1", 0); New DownloadFileFromURL (

asp.net - Print multiple gridviews in c# using single procedure -

This is my work code I need some help in making this trend because I < code> itextsharp When I click on the print button, it runs MySelectProcedure1 and the result of the table Is downloaded to PDF in the DataTable . Secure Zero btnPrint_Click (Object Sender, EventArgs e) {Process ("MySelectProcedure1"); Process ("MySelectProcedure2"); } Secure zero process (string process) {connection con = new connection (); SqlDataAdapter da; Datatile dt; Con.con = New SqlConnection (con.str); Con.cmd.CommandText = Proc; Con.cmd.CommandType = CommandType.StoredProcedure; da = new SqlDataAdapter (); Da.SelectCommand = con.cmd; Dt = new datatable (); Try {con.con.Open (); Da.Fill (DT); Print (dt); } Hold (Exception Pre) {} Finally {con.con.close (); Con.con.Dispose (); }} Protected Zero Print (DataTable DT) {GridView GridView1 = New GridView (); GridView1.AllowPaging = false; GridView1.DataSource = dt; GridView1.DataBind (); Response.ContentType = "Apps

html - Editing classes from different classes -

Image
What I want to do, changes the rotation of the element marked in green, when rotating an element in orange. I know that you can have things like ul li.classname I have tried to do something like this, but I I do not think I fully understand different levels to reach different elements. The code itself: & lt ;! - Start the link for different pages - & gt; & Lt; Navigation ID = "Navigation" style = "margin-top: -15px; margin-left: -50px" & gt; & Lt; ul style = "list-style: none" class = "test" & gt; & Lt; A href = "index.html" & gt; & Lt; Img id = "home-button" src = "picture / home page" & gt; & Lt; / A & gt; & Lt ;! - Sweet Links - & gt; & Lt; Li class = "sweet-tabVis" & gt; & Lt; a href = "product page 1" & gt; & Lt; Img id = "sweet-button" src = "picture / Sweets_Button.png" & gt

c# - (Unity 2D) Destroy instantiated prefab when it goes off screen? -

After the text "itemprop =" text "> im create unity 2d games in a 2D game (4.3), and i get prefabs that get instantiated when those prefabs go delete Need for the screen off I have written some code to underwent the object, but when I close the screen I want to remove those prefabs. Here's the code I have written so far. to generate prefab (C #): zero update () {float y = Random.Range (-4.53f, 2.207f); If (X & LT; 2000) {Institution (Handicap, New Vector 3 (Y, X * 6.0 F, 0), Quattrocessor); X ++; } // debug Log (x); } to destroy prefab (C #): / *************** * *************************************************************************************************** * ******************************** InstantIated Obligation Receives * And Destroy It On The Exit * Memory ******** To save ********************************************************************* *** ****************************************** (GameObject) Illustration (obstacle); / * If (clon

Automate inputs to vim in a bash or perl script -

I have a script that calls in an external program in an external program. This external program opens a Vim terminal to add to my comments every time, when the loop is weighted. Is there any way I can automate this part? Any hints will be appreciated. The question is whether you have control over Vim Inoculation external device ?! Typically, such programs use an environment variable such as $ EDITOR to determine the user's favorite editor program. If this is the case (or you can also modify the external device), you can write a non-interactive editor replacement script which automatically applies to whatever change you want automatically. Here is a simple example with sed : # / bin / sh sed -i -e 's / foo / bar /' "$ @" If Viam's voice is hard, then you may have to mess with this script name vim and $ PATH .

jquery - Get height of image in 2nd LI -

In this code to achieve the height of the image contained in the 2nd layer, struggling to get the right jQuery ... any idea ? & lt; Ul class = "example" & gt; & Lt; Li & gt; & Lt; Img src = "example.jpg" width = "500" height = "500" & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; Img src = "example.jpg" width = "500" height = "500" & gt; & Lt; / li & gt; & Lt; / Ul & gt; Use or eq is zero-index based Therefore it starts with 0 $ ('example li: eq (1) img'). Height ();

Create a 3d shaped button in android -

Image
I'm trying to create a button similar to seeing the round button here - (Each button looks like this is inside a disassembled section) I had to put the button in a circle background and end up with a slight gradient - though I found this result - (I can upload my code once) How do I see this So I? Try this code I'm able to create an image that looks like this which is similar to the first button that you link to , Using the following code. File: res / drawable / button.xml The file should be in the shape of the layers & lt; Layer-list & gt; to use. & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Layer-list xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & Lt ;! - External boundary / Shade - & gt; & Lt; Items & gt; & Lt; Size Android: shape = "oval" & gt; & Lt; Size Android: width = "200dp" Android: height = "

excel - Pasting value into matched cell in another sheet -

please help! I have a problem that I was stuck for the last day I need to move data from one sheet to another in another workbook. The output line matches a value in the input column , And the output column input sheet corresponds to a date in column B. I have lesser input-out workbooks / Sheet Wbin, wbout, sheetin, sheetout, respectively. Does anyone help me, where's my problem? I got the error runtime error '9': copy the subscript outside the range in the destination line. Windows (wbin). Activate Sheets (Sheetin). Select IMaxRow = 5000 Dim subj1 as the string for the IRO dim = 1 iMaxRow subj1 = range ("B" and "iRow") as the string. Text subj2 = range ("A" and "iRow"). Text with workbooks (wbin) Sheets (Sheetin) .seel (iRow), 3) 'start the error again but next. Kompi Destination: = Workbooks (wbout). Worksheets (Sheetout) .Cell (Worksheet Function Match (Sabze2 and "*", _Webout) Sheets (Chadrin). Column (2),

Can not copy some SQL server files -

I have attached some databases for my SQL server instance. I think of different behaviors, while DB Has been added in the same way. When I try to copy the folder containing the files, then some files do not copy and give the error, while that file is in use, some other, with the same example Is connected and in the same folder, copy without problems. Please note what is the difference? Thanks The correct way to copy files are as follows, it is only user database Applies to: To transfer data or log file as part of a planned restore, follow these steps: Run the following Optional database database_name set offline Move the file or file to the new location. To move each file, run the following statement. Alternate database database_name modified file (NAME = logical_name, FILENAME = 'new_path \ os_file_name'); Run the following statement ALTER DATABASE database_name SET ONLINE; Confirm the file change by running the following query. SELECT

javascript - angular-file-upload not adding file to the request -

I am using the server running the node to upload a picture and express it to 4.0 and file me There is a problem coming in to data on Ever. This is the relevant code: & lt; input type = "file" ng-file-select = "select onfile ($ files)" & gt; angular controller: $ scope.onFileSelect = function ($ files) {var file = $ files [0]; // [..] Verification $ scope.upload = $ upload.upload ({url: 'API / settings / photo', method: 'post', file: file, header: {'content-type': undefined}} ). Progress (avt) {$ scope.percent = parseInt (100.0 * evt.loaded / evt.total);}) Success (work (data) {console.log (data);}) Error (task () {console.log ('error');}); }; Server code: // Image app. Root ('/ api / settings / picture') .post (middleware.auth, users.change images); Root handler: export.changePicture = function (req, res) {var userId = req.user._id; Console.log (req.files); }; req.files always undefined

sorting - Sort a dict with date key in Python -

मेरे पास दिनांक समय की कुंजी के साथ एक शब्द है {u'2014-04 -21 14:46 ': {u'status': 0, u'created ': u'21-04-2014 14:46', u'duration ': u'0: 12'}, u'2014-04 -22 10:31 ': {यूस्टेट्स': 0, यू'केटेड ': यू'22-04-2014 10:31', यू-डैशन ': u'1: 28}} मुझे उस तारीख समय की कुंजी के साथ सॉर्ट करने की आवश्यकता है। मैंने पहले से नीचे की कोशिश की है जो कि इसमें उल्लेख है और यह अपेक्षित रूप से छंटनी नहीं कर रहा है। आदेश दिया गया = आदेश दिया (सॉर्ट किया गया (mydict.items (), कुंजी = लैम्ब्डा टी: टी [0])) उस प्रश्न में 2014-04-21 और मेरा 2014-04-21 14:46 । कोई भी सहायता सराहना करेगी। जहाँ तक मैं अपने नमूना सेट से देख सकता हूँ, आप ISO दिनांक का उपयोग कर रहे हैं। आईएसओ तारीखें हैं उनमें विशेष मामलों की तारीखों को संभालने की कोई आवश्यकता नहीं है। मैं आपके कोड में कुछ भी गलत नहीं देखता हूं। अपना कोड चलाने के लिए, उदा। & gt; & gt; & gt; सूची (क्रमबद्ध दिखे (क्रमबद्ध (mydict.items ()

How to convert this Pascal Code to JavaScript? -

I am trying to create a ZS code that determines the number of 1 to 9 in a string. I have this Pascal Code that works: Var n, i: longint; A: array [0..9] byte; Start typing ('Ð ?? вÐÐ'ÐÑÑÑ? Ðμ Ñ ?? ÐÑÑ ?? Ð »Ð¾:'); Ridleyn (N); While n & gt; Start 0 [n mod 10]: = A [n mod 10] +1; N: = n div 10; End; For the Eye: = 0 to 9, Rictoran ('number', ',' is, a [i], 'quantity of time'); Readln; End. In JS I ended up with it but it seems that there is never ending loop: function plush (form) {var list = New Array (9); Var n = form.a.value; While (n> gt; 0) {a = n% 10; List [a] = List [A] +1; N = n% 10; } For (var i = 0; i & lt; = 9; i ++) {warning ("Ð Ð Ð Ñ Ñ" Ð ° "+ i +" Ð²Ñ ?? Ñ ?? Ñ ?? ÐμÑÑ ?? Ð ° ÐμÑÑ ?? Ñ ± [i] + "n ?? Ð ° Ð ·");}} I will get any help about this Thanks in advance! n = n% 10 Leaves n as soon as it is less than 10 , it will never reach 0 , hence an endless loop. / P> Change

ios - How can i find programmatically iPhone device connected 3G network or Wifi in iOS7 -

Hello I have to find out if there is any suggestion from the Internet Internet 3G or 2G or WiFi Network Thanks Download Reachability Class for iOS from this link: - 1) Rechargeability H & M in your project Add , make sure that you flag it to ARC-fno-objc-arch 2) Now, check the connection type in your view controller Richability * Accessibility = [Reachability Possibility for Internet connection]; [Accessibility StartNotifier]; NetworkStats position = [reachability current resheability credits]; If (status == Notitable) {// no Internet} and (position == ReachableViaWiFi) {// wifi} and if (position == ReachableViaWWAN) {//}}

javascript - Return data from Closure Within Block Within Function -

मैंने अपना जावास्क्रिप्ट इस प्रकार सेटअप किया है function getData (uri) {var $ result; Var डेमोएपीआई = यूरी; $ .getJSON (डेमोएपीआई, फ़ंक्शन (डाटा) {$ .ईच (डेटा, फ़ंक्शन (कुंजी, वैल) {नाम [कुंजी] = वैल ["नाम"]; नंबर। पश (वैल ["नंबर"]);}) ;}}) किया (कार्य () (के लिए (i = 0; i & lt; names.length; i ++) {var tmp = नया अर्रे (नाम [i], संख्या [i]); परिणाम push (tmp); } वापसी परिणाम;}); } समस्या है, इस सेटअप के साथ मैं फ़ंक्शन का उपयोग नहीं कर सकता: var मान = getData ('/ users'); के रूप में return स्टेटमेंट $। getJSON ब्लॉक के भीतर एक क्लोजर में है, अगर मैं return < / कोड> ब्लॉक के बाद कहा कि यह एक खाली सरणी देता है क्योंकि यह एजेक्स कॉल पूरा होने से पहले कॉल किया जाता है। अगर मैं $। Ajax () का उपयोग करने का प्रयास करता हूं तो मुझे एक ही चुनौती का सामना करना पड़ेगा। मुझे अपने फ़ंक्शन getData () से उत्पन्न सरणी लौटने में मदद की ज़रूरत है। जैसा कि आपने पाया है, आप एसिंक्रोनस फ़ंक्शंस से डेटा भरोसेमंद रूप से वापस नहीं कर सकते। ड

Fit a parametric density to an constant piecewise Function in R, argument is missing error -

Suppose someone pulls me a histogram and I want to smooth it, and want to get a smooth function. Is there a way to do this in their R? (Histogram is not coming from the data, so the estimator of the kernel density is not suitable. Please tell me if you think I am wrong on this.) So far, I have a parametric distribution of my histogram To do this, I reduce the integrity class error between my histogram and beta distribution. This is my code, where H is a piece-wise stability job with support [0; 1]. h < -function (x) (x> 0 & x & lt; 1) * 1Fit Beta and lieutenant-function (h) {function (alpha, beta) {dff 2 and lt; -Function (x) (H (x) -d beta (x, alpha, beta) 2 returns (integrated (define 2), 0,1)) res & lt; -constroptim (theta = c (1,1), f = dist, grad = null, ui = matrix (c (1,1), 1,2), ci = c (0, 0)) returns & lt; -res} And R says: Error in db eta (x, alpha, beta): the logic "beta" is missing, no default No I do not understand why R DB

javascript - Change iframe src through js -

Then coming directly to the problem, I am writing a JS, which src is < Strong> iframe if screen resolution changes & lt; Script language = "javascript" & gt; Function newframe () {var w = screen.width; Var srchframe = document.getElementById ("proj"); Var targetURL1 = "http://wms.indianpropertynetwork.com/exchange/frames/clients.featured_projects.asp?cnt=5&wd=880&prj=1"; Var targetURL2 = "http://lpm.indianpropertynetwork.com/exchange/frames/clients.featured_projects.asp?cnt=4&wd=668&prj=1"; If (srchframe.src! = TargetURL1 & amp;> 1300) {srchframe.src = targetURL1} and {srchframe.src = targetURL2}} & lt; / Script & gt; And call this function in the following iframe & lt; Iframe id = "proj" onload = "newframe ();" MarginWidth = "0" margin-height = "0" width = "100%" height = "200px" frameborder = "0" scrolling = &qu

php - Any Plugin for graph like this? -

Image
"पाठ"> सबसे निकटतम बात मैं सोच सकता हूँ D3.js lib उदाहरणों को देखें।

python - Tor doesn't work with urllib2 -

I am trying to use Tor for anonymous access through privoxy as a proxy using urllib2 . System Info: Ubuntu 14.04, Recently upgraded to the dist-upgrade from 13.10. This is a piece of code that I am using for testing purposes: import urllib2 def req (url): proxy_support = urllib2.ProxyHandler ({" Http ":" 127.0.0.1:8118 "} Opener = urllib2.build_opener (proxy_support) opener.addheaders = [('user-agent', 'mozilla / 5.0']] return opener .open (url) .read ( ) Print Rake ('https://check.torproject.org') One page above Sorry, but for you my configuration: / etc / tor / torrc code> control port 9051 # # If enabled, be sure to enable one of these ## authentication methods to prevent attackers from accessing it. #HashedControlPassword 16: 872860B76832A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C HashedControlPassword16: B3B0BA631D41D6FE601488FC7A9A2E80AB7815580C1C78F2865F30F63B / etc / privoxy / config Forward SOCKS

Storing a list of strings to a HDF5 Dataset from Python -

I am trying to store a variable length list of strings on the HDF 5 dataset. The code for this is import h5py h5File = h5py.file ('xxx.h5', 'w') strList = ['asas',' asas', 'asas]] h5File I An error is saying that "xxx" ('lex', '1'), 's10', strilist) h5File.flush () h5File.Close () TypeError : There is no conversion path for dtype: dtype ('& amp; amp; U5 lt U3)' where & amp; Amp; LT is less than the actual symbol How can I solve this problem You can unicode Studying in strings, but specifying their datatype as ASCII. According to, the h5py does not currently support this conversion. Note: You must encode the string in a format h5py handle: asciiList = [n.encode (" Note: Not everything, but it's also, can be encoded in ATCI!

internet explorer 9 - IE9 issue, CSS is not loading -

I have problems with CSS on IE9, CSS is not loaded properly, what am I trying to do? Add charsets at the top of main.css Convert compatibility mode to IE 8 9, edge Remove all unnecessary white space before the functionality . CSS is not loaded ... My website: What can I do with this? I found it in my html: gt; & Lt; Html class = "no-js lt-ie9 lt-ie8 ie7" lang = "en" & gt; & Lt; [endif] - & gt; & Lt ;! - [If IE 8] & gt; & Lt; html class = "no-js lt-ia 9 9" lang = "n" & gt; & Lt; [endif] - & gt; & Lt ;! - [gt gt gt] 8] & gt; & Lt; html class = "no-js ie9" lang = "en" & gt; & Lt; [endif] - & gt; & Lt; Html lang = "en" & gt; I think this should be: gt; & Lt; Html class = "no-js lt-ie9 lt-ie8 ie7" lang = "en" & gt; & Lt; [endif] - & gt; & Lt ;! - [If IE 8] & gt; & Lt; ht

ios - how to save the content of a uitextview to a tableview -

I have UITextView and when I press the 'Save' button I like it! Code> text will be added to a line in my UITableView . I already set the table view I would like to go to UITextView while selecting one on the table view. First of all, you have to add the data to your data source. Depending on the establishment of your desk, if you edit your question with more details, then I can get more specificity here. Next you call insertRowsAtIndexPaths: WithRowAnimation: Changing the value of the index path depending on the table view on which you add new data. The table view will take care of the rest, call it to cellForRowAtIndexPath: using the new table cell (using data that you have just added to the data source) And you can even animate it in this situation. For the second part of your question, you will need to implement the tableView: didSelectRowAtIndexPath: and it will receive the appropriate string based on the selected data from your data source,

excel formula - CountIfs function with two criteria -

मेरे पास कॉलम एच में लिंग मान (एम, एफ) और आयु सीमा मूल्य (& lt; 12, 12-14, 15-21, 22-35, 36-45, 46-60, & gt; 60) कॉलम जे में हैं उदाहरण के लिए, मैं में पुरुषों की संख्या की गणना करना चाहता हूं आयु सीमा 12-14 यह COUNTIFS फार्मूला, hyphenated आयु सीमा मूल्यों के लिए काम करता है, लेकिन & lt; 12 और & gt; 60 मानों की गणना नहीं कर रहा है: = COUNTIFS (H4: H1000, " यह क्यों है? इस बारे में: = COUNTIFS (एच 4: एच -1000, "एम", जे 4: जे 1000, "& gt; = 12", जे 4: जे 1000, " & Lt; = 60 ") इसके अलावा, मैं श्रेणी को ठीक करने की सलाह दूंगा ताकि आप फॉर्मूला को भरते समय बदलाव न करें: = COUNTIFS ($ H $ 4: $ H $ 1000, "M", $ J $ 4: $ J $ 1000, "& gt; = 12", $ J $ 4: $ J $ 1000, "& lt; = 60") या इससे भी बेहतर: = COUNTIFS ($ H: $ H, "M", $ J: $ J, "& gt; = 12", $ J: $ J , "& Lt; = 60")

select - sp_send_dbmail sending mail even if condition is false - SQL -

मेरे पास एक संग्रहीत कार्यविधि का IF स्टेटमेंट हिस्सा निम्नानुसार है: अगर कोशिश करें तो EXISTS (SELECT जो मैंने पुष्टि की है कि रिटर्न कोई परिणाम नहीं है, इसमें एक अन्य कॉलम में से एक वेरिएबल कहलाता है जहां खंड में है) BEGIN EXEC msdb.dbo.sp_send_dbmail @profile_name = @dynamic_profile, @recipients = @dynamic_recipient, @subject = @subjectline, @body = @mailHTML, @body_format = 'HTML'; END END कोशिश यह एक नौकरी से जुड़ी है जो हर 15mins को चलाता है << p> Div class = "post-text" itemprop = "text"> कोशिश करें - इसके बजाय: यदि (सेलेक्ट COUNT (*) जो भी हो) & gt; 0 BEGIN - MAIL END

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -

Currently, my user needs to downgrade their database from sqlce4.0 to sqlce3.5 for our application. , I found a post and it basically caters to my requirement except that the user needs intervention of both solutions, ideally I will target this target to automatically (i.e. users To create without any interference) I want to code a small tool to achieve this goal. So my idea is: 1. Since I know the schema of this DB, so I make an Sclc 3.5 empty DB first. 2. Then open the old SQL 4.0 db and the new escrow 3.5 db at the same time. , And then ask sqlce4.0 DB from the table table and insert them into the new sqlce3.5 dB. It sounds good, but when I try with the C # project, it seems that it can only add an SKL accessory reference (either V5 or V4.0). I know this ninth place has improved pollution. But how can I solve it? 3. Or if I have to export the data to the SQL file and then import it into SQL 3D DD? If some console utility is to impede which supports importing SQL data in sqlce

android - Forcing microphone input when bluetooth is on -

Text after " I have two services: Record for the first time with Bluetooth but in the second I want to do a microphone input, how to make a voice recorder by Bluetooth is always on? Thank you. I have tried am = (AudioManager) getSystemService (AUDIO_SERVICE); Am.setBluetoothScoOn (wrong); Am.stopBluetoothSco (); Am.setMicrophoneMute (wrong); But this does not record via the microphone when Bluetooth is turned on. You are connected to the Bluetooth device when you set the flag (self) to record from the phone Then the flag is not set (closed) Do not register Receiver only call the normal initial record () method. Check the AudioManager state inside the BroadcastReceiver and onReceive when the flag is set and start recording. A record from the Bluetooth headset with the registration means that the code below can help you. Record button Here's the Bluetooth flag variable (switch) button.setOnClickListener (New View. OnClickListener () {@Override Public Zer

javascript - Google Maps caching tiles in hybrid mobile application -

एक हाइब्रिड वेब अनुप्रयोग (फोनगैप) में मैं काम कर रहा हूं मैंने Google Maps JavaScript API v3 को कार्यान्वित किया है। नक्शा आवेदन का एक बड़ा हिस्सा है और यह महत्वपूर्ण है कि मैं यह सुनिश्चित करने के लिए जो कुछ भी कर सकता हूँ, वह सबसे अच्छी गुणवत्ता है जिसे मैं इसे आवेदन के लिए प्राप्त कर सकता हूं। नक्शा के साथ ध्यान देने योग्य समस्या निम्न है: ऐप और लोड नक्शा आवेदन को बंद करें और फिर से आवेदन खोलें फिर से मानचित्र लोड करें जब नक्शा फिर से लोड होता है, तब लोड करने के लिए समान समय लगता है क्योंकि पहली बार ऐसा कुछ सेकंड हो सकता है। यह मेरे लिए पूरी तरह से अनावश्यक और मेरे हिस्से पर बुरा डिजाइन लगता है। अगर ये टाइल सेकंड सेकने पहले ही डाउनलोड की गई हैं तो निश्चित रूप से छवियों को तेजी से लोड करने के लिए दूसरी बार गोल करने के लिए कैश किया जाना चाहिए? यह हो सकता है कि वह फोनगैप का हिस्सा हो, क्योंकि मुझे यकीन है कि Google करता है कैश्ड छवियों को वापस करने का एक प्रयास। मैं अपने फोनगैप अनुप्रयोग में इन मानचित्र लोड बार में कैसे सुधार कर सकता हूं?

c# - async await execution order - code only actually works when stepping through/debugging -

I hope there is a simple answer here, and this is probably due to my misunderstanding of asynchronous tasks ... I have a way that can be started manually or programmatically can start automatically after loading. However, when the method works completely when the Async method is applied (on the button press), the method starts leaving the main "waiting" part without any part of the autoloaded method, and finally leaves directly at the end. The entire process begins with this method: Private Waste Startbatch () {var batch size = (int) batchasislider.value; If (_config.AutoStart) {ExecutionLogAddItem (string.Format ("Auto Batch Processing started (batch size: {0})", batchies.tostring ()); Work.factor Startup (async () = & gt; {wait for batch transfer; fullbatch ();}); } And {var start = ConfirmStartBatch (); DoBatch = start.ContinueWith (async (continuity) = & gt; {start the work // if (start.Result == true) {ExecutionLogAddItem ("started batch

uml - Use case diagram for role based list filter -

Image
I have to model an experiment case diagram with the following requirements: We have 3 actors (Actor 1, actor 2, actor 3). All artists can see a list. The list should be automatically filtered on an actor basis. Therefore Actor1 Filter1 has been applied to the list automatically, Actor2 Filter2 is applicable and Actor3 Filter3 is applicable to it. I'm not sure what is the best practice to model this scenario using the usage scenario. You have basically 2 options. Finally use a UC with different scenarios (in my opinion, liked) In this case you only have 1 UC and All the actors are connected. In the special circumstances of each actor, just create 3 different scenarios for each actor and decide on the basis of the actor, which scenario you can use only you can use 1 scenario and cover all the rules within it. You can. This is also a better option, if the difference is equally small and easy and is defined in the same point in the scenario. Use different UCs Yo