I am trying to write c code for encryption and decryption by using open SSL. But I am not able to do this. I went to it, but whatever code received from the internet was out of my head. The main function goes here that I got from the stack overflow. I tried to use it ?? But | I could be bad Encrypt (FILE * rsa_Pkey_fole, FILE * in_file, FILE * out_file) {} int main (int argc, char * argv []) {FILE * rsa_pkey_file, * infile; Int rv; If (argc & lt; 2) {fprintf (stderr, "Usage:% s & lt; PEM RSA public file & gt; \ n", argv [0]); Exit (1); } Rsa_pkey_file = fopen (argv [1], "rb"); Infile = fopen (argv [2], "w"); If (! Rsa_pkey_file) {perror (argv [1]); Fprintf (stderr, "PEM RSA Public Error loading file. \ N"); Exit (2); } RV = Encrypt (RSA_PP_FILE, INF.TXT, standout); Fclose (rsa_pkey_file); Return RV .; } and similarly decryption.
How can I make the RSA encryption and decryption of the file using CRM open SSL library in an easy way? The steps for RSA encryption are as follows:
-
Read the public key in the
RSA * structure. It depends on your main nature. If the key is in the format PEM , then use the PEM_read_RSA_PUBKEY function. If it's in the DER form, then use d2i_RSA . - Encrypt your data using the RSA public key.
RSA_public_encrypt function. - Write a file or type what you want to do.
RSA decryption steps are as follows:
- Read the private key in the
RSA * structure . This is similar to Stage 1 in RSA encryption with some minor differences. - Decrypt the data using
RSA_private_decrypt . Use RSA_private_decrypt . You can see the OpenSSL documentation which is quite useful and its knowledge is intuitive. I just give you a broad level of consideration if you need more help, then I posted the code example I can do
What kinds of options do I encounter while facing a dropdown menu, which is so wide that the menu width adjusts Is not possible for? That means the page breaks the layout, or looks just ugly if the dropdown is adjusted to fit for a long time.
Hooks? Cut plus full hover text?
Thank you. I agree with Gordonby in relation to reducing options can be difficult to read. Extremely long alternatives,
And as you said it looks awful.
If your dropdown is populated by user input, however, I can restrict length. What can be said with 15 words should be said with 5 ... If this can not happen, then maybe a dropdown is not your best choice. For example, if your option is the title of research papers and their authors, you can probably summarize them in some key words ("String Theory and You [Brown 2008]") On the other hand, if the option itself is different from some words And that is, if they become smaller (like "peanut butter and grapefruit sauce and jelly sandwich of grapes with soy milk" and "peanut butter and boy Saberi jelly carrot rods and sandwiches with 2% milk) "You may be able to display all the options alternately, display it properly with a checkbox or radio button.
(If you are using ASP.NET, basically I'm using a criminal instead of a dropdown list)
This second approach gives you other elements You can also allow to include that you will not be able to dropdown. Take a look for ideas.
According to the questions, if Project A is X, Y & amp; Z packages they, in return, are D1, D2, D3, D4 and O. D5 package is the composer D1, D2, D3, D4 & amp; D5 x, y and z packages for three times?
It looks logical but is not particularly practical if D1, D2, D3, D4 and AP The D4 package requires another set of shared dependencies .... It will have a lot of duplicate code inside a project code base.
Thanks in advance
short answer is not loading from PHP The time is impossible, because it does not make sense to download dependencies independently per package. Therefore, the composer will solve all the dependencies for all of your packages, and then install them once without duplication.
What data is not available when there is a way to remove or hide the gray area of winform's datagrid?
The second is how to delete / hide the default gray column?
dataGridView1.DataSource = oresult; DataGridView1.Column ["Id"]. Visible = false; DataGridView1.Column [[AddBy]]. Visible = false; DataGridView1.Column ["AddInInClass"]. Visible = false; DataGridView1.Column ["IsDeleted"]. Visible = false; DataGridView1.Enabled = false; I'm hiding such unnecessary columns, but I'm unable to find a way to hide them.
You can hide the first column of your datagrid to set
I am opening this thread which is exactly like any other but I can not understand any problem: I have a The input field that allows the alphanumeric string to be substituted with optional split space as a separator, then an alternate other alphanumeric string etc .... I am getting this regex:
^ ([0- 9a-zA-z] +?) * $ This works! But the performance is very bad as soon as I have 2 hundred empty spaces and those 2 spaces are very far in the sentence. In the example given below, the result is fine in the second half if I put 2 places at the beginning of the sentence. But it lasts for 10 seconds or longer, then is located away.
Dzdff5464zdiophjazdioj ttttttttt zoddzdffdziophjazdioj ttttttttt zoddzdffdzdff Ttttt zoddzdfff Ttttt zoddzdfff Ttttt zoddzdfff Ttttt zoddzdfff Ttttt zoddzdfff Ttttt zoddzdfff Ttttt zoddzdfff Ttttt zoddzdfff Ttttt zo999 ddzdfff Ttttt zoddzdfff Ttttt zoddzdff
2 The spaces are after 999 . Do you have any ideas or suggestions for improving this reggae? Thanks and relation
pf
ps: As soon as you enter, invalid characters in the string are not yet, especially 2 spaces.
Edit: Another example: 12345678901234567890 '==> 20 characters + 1 invalid character = & gt; The result is 5 valid four pairs of instant and it lasts 5 seconds to regex! I suggest changing the expression like this: (? I) ^ [0-9a-z] + (?: \ S [0- 9a-z] +) * $
This is functionally similar, because it will match all alphanumeric characters, which Are only demarcated from the place. One major difference is that I took the initial word check to the expression, then the non-capture group (?: ... ) for the remaining space non-capture group (?: ... ) are rapidly capturing group ( ... ) because the regex engine does not need to maintain the matched values. And on repeating words, the engine does not need to validate that by transferring the space \ s to the word group, the first character in the group is included in the square class. You must have a typo in your character class [0- 9a-zA-z] last z , perhaps the upper case should be < There will be some strange unexpected results in the code> e-z format. In my expression, I initially compelled to add a code <(code) (? I) , in which case the case of insensitive mode was changed, and I changed the square class to [0 -9a-z] . In my trial, I think your expression ^ ([0- 9a-z] +?) * $ takes about 0.03 seconds to process your sample text My recommended expression completes the same examination in approximately 0.000022 seconds with 2 extra locations towards the end. Wow, this is a wonderful delta.
I hope you can help me with this problem. When I click on an email button, before successfully sending it, it takes a few seconds to process. I need to insert the process image but how to implement it with the "while" loop for processing.
Here is the code: I think I should apply with the customer. Send (msg); for processing. how does it work? I appreciate your example code thanks! (I am using C # and WPF)
Private Zero BtnSendEmailClick (Object Sender, RoutedEventArgs e) {SmtpClient Client = Zero; Mail message msg = null; {Msg = new mailmessage {{try new mailorder ("me@hotmail.com", "Me Hotmail")}; Msg.To.Add (txtEmailAddress.Text); message. Priority = Mail Preference High; Msg.subject = "Blow Blah"; Msg.Body = "& lt ;; DOCTYPE html> gt; html lang = 'n' xmlns = 'http: //www.w3.org/1999/xhtml'>" + "& Lt; head> gt; & lt; / head & gt;" + "& Lt; body & gt;" + "& Lt; h3> messages & lt; / h3 & gt;" + "& Lt; p & gt;" + LblEmailMessage.Content + "& lt; / p & gt;" + "& Lt; / body & gt;" + "& Lt; / html & gt;"; Msg.IsBodyHtml = True; Client = New SmtpClient {host = "smtp.live.com", port = 25, EnableSsl = true, UseDefaultCredentials = false, credentials = new network credentials ("me@hotmail.com", "password"), DeliveryMethod = SmtpDeliveryMethod. Network}; // How to implement when looping for the processing client Send (msg); LblMessage.Content = "Your mail has been successfully sent!"; } Hold (Exception pre) {lblMessage.Content = ex.Message; }}
You will need to return immediately, and BackgroundWorker Once it's finished to send an email, you can use the Dispatcher to notify the GUI. For more information, see. Also see.
I am creating a weather station using a raspberry P I have various sensors (temp, humidity, pressure, rain, etc.) ) And now I'm getting the process of wind sensor for me.
I have a dragon program which looks at the GPII pin, calculates the pulse to calculate the anomometer and the speed of the wind, to get this direction, through the anchorage of air through the ADC Also reads. For other sensors, I only process every few minutes and dump data directly to DB. Because I have to calculate a lot of things from wind sensor data, I do not necessarily want to write DB in every 5 seconds and then to read the data of the last 5 minutes to calculate the current speed and direction. I want to gather data in memory, processing it, then writing the last data in DB is something like sensor reading:
day-time, speed, direction = 2013-6-20 09 : 33: 45, 4.5, W 2013-6-20 09:33:50, 4.0, SW
2013-6-20 09:33:55, 4.3, W.
The program is calculating every 5 second data from the air sensor, I would like to write the data to DB every 5 minutes because the DB is on an SD card, I do not want to explicitly write DB 60 times, Then read it back to process it, then write it in permanent archival db every 5 minutes.
Am I better using the list of lists? Or a dictionary of Tuples made by datetime?
{datetime.datetime (2013, 6, 20, 9, 33, 45, 631816): ('4.5', 'W')}
{datetime.datetime (2013 (6, 20, 9, 33) , 55, 3872 9 4): ('4.3', 'W')}
For the latter, what is the best way to update a dictionary? Do I have it in a DB Leave it and read it back? It seems that one reads a lot for such a small number of data a day.
Multiple cache Layers Between Python Programs and Databases Specifically, Linux Disk Block Cache Usage Depending on the pattern of, you can keep your database in the core. Therefore, you should not believe that writing in a database and reading back is necessary to slow down some home-made cash in your application. And the code that you write to optimize your DB prematurely is going to be infinitely more buggy than the code.
For the workload you specify, MySQL M Zhe little Heavyweight relative SQLite, but you may be unsure of the reason for it.
I am quite new to WINAPI, and I need some help in text output. I have an array of pixels that I type in with the function and then from time to time I bluetooth on the screen using the following functions:
DWORD WINAPI tickThreadProc (handle handle) {ShowWindow ( Hwnd, SW_SHOW); HDC HDC = GETDESSY (HWD); HDCMM = Content compatible DC (HDC); HBITMAP HBMeld = (HBITMAP) Selection Object (HDCMM, HBMP); Int delay = 1000 / fps; InitPhys (); LoadIMGs (); For (;;) {onFrame (pixel); Bitblatt (HDC, GLIFT, GTOP, width, height, HDCM, 0, 0, SRCCOPI); // Wait slept (delay); // Physics Symphies (); } Select Object (HDCMM, HBMold); DeleteDC (hdc); Return 0; } Vs. MacSaPhase (HWNH HWD) {bitmapinfo BMI; Bmi.bmiHeader.biSize = sizeof (BITMAPINFO); Bmi.bmiHeader.biWidth = width; Bmi.bmiHeader.biHeight = HEIGHT; // Top pixels from top to bottom bmi.bmiHeader.biPlanes = 1; Bmi.bmiHeader.biBitCount = 32; // Not using previous bytes, 32 bit bmi.bmiHeader.biCompression = BI_RGB for alignment; Bmi.bmiHeader.biSizeImage = 0; Bmi.bmiHeader.biXPelsPerMeter = 0; Bmi.bmiHeader.biYPelsPerMeter = 0; Bmi.bmiHeader.biClrUsed = 0; Bmi.bmiHeader.biClrImportant = 0; BMI.BM color [0]. RGb 0 = 0; Bmi.bmiColors [0] .rgbGreen = 0; BMI B.B.Colver [0]. RGBRED = 0; BMI.BMI collar [0]. RGB reserved = 0; HDC HDC = GETDESSY (HWD); // Always create a box compartment to dial. Direct access to pixels HBMP = playback (HDC, BMI, DIB_RGGOLAS, (zero **) and pixels, faucet, 0); DeleteDC (hdc); // Create a new thread to use as a timer hTickThread = CreateThread (NULL, 0, and TickThreadProc, NULL, 0, NULL); } Some codes found on the Internet have been modified. I have 4 ints for R, G, B, and A in pixel structure.
It is impractical to output text and load images for text. Any help?
First of all, if you use GetDC to handle the device reference, you should Use ReleaseDC when you will do it with DeleteDC for only for device references created by you. To draw text in this window, you can use the function before using that DC or using it.
Painting is meant to handle WM_PAINT messages (which is a more common way to attract in a window) It seems that you are trying to draw directly from another thread on a regular basis instead Are there. GDI is not very good in dealing with multiple threads, so you may have some problems with this approach, but if your bitsbets are working then one textot should also work.
I was an exception when making an app using an alarm but unfortunately I did not know the answer. Alarm = New Alarms (Title Box. Text); //alarm.BeginTime = DateTime.Now; Alarm.BeginTime = DateTime.Now.AddSeconds (5); Alarm. Resource = "Alarm set for note. Please check it now."; Alarm. End time = end time; Alarm. Repetition type = recurrence interval.No; IsAlaramOn = True; ScheduledActionService.Add (alarm); An exception occurs when the start time is datetime. Now? Why do I need to add a few seconds?
Although I'm not familiar with Windows Phone 7 development, I think, logically, Alarms will not accept the current time because the code running at the time starts from the alarm time, even some milliseconds.
If you think about it, then the computer thinks in an era, not in hour / minute / second. Therefore, even if a millisecond pass, because the alarm was set to "now", then the alarm is past.
Microsoft developers have set up an alarm class for this alarm, the alarm is set to "now", due to that discrepancy, possibly because the alarm will not fire retro (if this fire If a fire has been set in the past, then it is necessary to provide them for determining if this happens, for very little profit.)
Again, though, I'm not familiar with Windows Phone 7 Platforms If one has the contrary, please contribute!
I am trying to filter the contents of a set of files in the directory and before using this kind of command only Output N line:
gzip -dc $ (% path-find folder% s) | Grep 27990 | Head-n 50 In the terminal, this command takes you to complete a few seconds to run. But when I run it from PHP it takes about an hour, because the total size of the files seems to be larger, like php is waiting until the gzip command is over. But if I run simple:
gzip -dc $ (find / opt / data / bi / ets / 20130616). Head-N50 This results in immediate results. I tried backquotes, exec, system.
Here is the php code:
$ cmd = 'gzip -dc $ (' find '$ path.' | Grep -E "'.' $ Regexp. ' "). Grep -E "'. $ This- & gt; _buildRegExp ().' $ '[' Border ']; $ Res = `$ cmd`; How to fix it?
Instead of using passthru to get all the output, not only the last string
($ CMD , $ Output); $ output echo;
In this question, "I am using a input , Type = "checkbox" to toggle the display of an element. This is the HTML of the demo posted in that reply:
< Code> & lt; Input type = "checkbox" id = "switch" /> gt; & gt; & lt; h2 & gt; This will be the 'navigation' element. & Lt; / h2 & gt; For Lt; / ne & gt; label = "switch" & gt; toggle navigation & lt; / label & gt; and CSS (sort for short With transition):
#switch {display: none;} #switch + nav {height: 0; hidden collapse; / * modified * /} # swiss: checked + NAV (height: 4 AM; color: # 000; background color: # FAA; / * after the change * label} {cursor: indicator}} .
Once I had posted the answer, I did that also after modifying the text of the label for the following selectors ('Navigation' ) To trigger the state-change of that checkbox The labels to use : label {display: inline-block; Cursor: indicator; } #switch + nav + label: before {content: 'show'; } # Swiss: checked + ava + label :: first {content: 'Hide'; } .
It was not working, at that time when the selector matched, while Input was in its arbitrary state (and label shown Show Navigation ), when the status of Input has changed to the selector failed match, note that the change is still on the nav element Were impressed, and the original matching selector indicates that the next-season co-ordinator basically matches. The above link shows a simplified demo of selectors in non-working (Chrome 27 / Windows XP). To minimize the selector-chain, it happens to me to try the common-brother coordinator. As a result, the following CSS (with a reflection for short):
#switch: checked + nav {background-color: #ffa; } Labels {Display: Inline-Block; Cursor: indicator; } #switch ~ label :: before {content: 'show'; } #Soft: Checked ~ label :: first {content: 'Hide'; } .
To my extent, this work changed ( content to label in response) changed to input In stage) So, the question: Why do common-brothers allow associate to update later brother-in-law, while the next-child mating (who matches the elements and structure of the DOM) does not?
Next, it does work in Firefox (21, on Windows XP); So I think the question has changed slightly to include: Is this a bug in Chrome / WebKit, or expected behavior? And, even Forward , it seems that this is a bug in Chrome (thanks @ ballclock), to some extent a ridiculous non-working Fixes the demo (though other, perhaps better, options exist as Scott's response): body {- WebKit-Animation: Bugfix Infinity 1S; } @ -webkit-keyframes bugfix {to {padding: 0; } To {padding: 0; }} # Swiss {} # Swiss + NAV {-Mozy-Transition: All 1S Linear; -MMS transition: all 1s linear; -O-Infection: All 1s linear; Webkit-Infection: all 1s linear; Transition: All 1s linear; } # Swiss: check + avu (background-color: #fa-moz-transition: all 1s linear; -mms transition: all 1s linear; -o-transition: all 1s linear; -webkit-infection: all 1s linear; infections : All 1s linear;} label {display: inline-block; cursor: indicator;} before #switch + nav + label: {content: 'show';} # swiss: checked + ava + label :: first {Content: 'Hide';} . Note: The reason for this is that I am updating it with 'fix', reply to it Instead of posting in the form, only because the question was not "how can I fix it?" But (basically) "Why does not this work?"
This is a long time running bug webkit browsing is related to the use of some dynamic pseudo-squares, with the next-generation couples It happens, is it that you are implementing the styles of brother-sister elements or the proxy element of that brother element.
I do not know that no one has filed a bug report yet, but it has been seen instead of on the site:
I'm having a problem ABUnknownPersonViewController is embedded in a navigation controller at the top, however, I use the navigation bar in my app:
ABUnknownPersonViewController * Unknown PersonViewController = [[ABUnknownPersonViewController alloc] init]; Unknown PersonViewController.displayedPerson = (ABRecordRef) [Build Build Contact Contact]; UnknownPersonViewController.allowsAddingToAddressBook = Yes; UnknownPersonViewController.unknownPersonViewDelegate = self; UINavigationBar * navBar = [[UINavigationBar alloc] initWithFrame: CGRectMake (0, 0, [UIScreen main screen] .bounds.size.width, 41)]; NavBar.delegate = self; UINavigationItem * backItem = [[UINavigationItem alloc] initWithTitle: @ "back"]; [Navbar Push Navigation Item: Animated Backlight Animated: No]; UINavigationItem * topItem = [[UINavigationItem alloc] initWithTitle: @ "Your Title"]; [Navbar Push Navigation Insom: Top Ietam Animated: No]; TopItem.leftBarButtonItem = Zero; [Unknown PersonViewController.view adsview: navBar]; [Self. Navigation controller Push ViewController: Unknown PersonViewController Animated: Yes]; Then it adds to a navigation bar, but the back button does nothing by changing the heading 'Title' ... very helpful additionally, no border of my navigation bar at the top Not so, I'm having some difficulty ... Images below ...
You can try to present it in such a way. I'm not using a navigation bar in the main view. This will add a cancel button to the top left.
ABUnknownPersonViewController * view = [[ABUnknownPersonViewController alloc] init]; See.View unknownView = self; // See the person's recorded data view.DisplayedPerson = person; See. AddingAdvertiserbook = Yes; UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: view]; View.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemCancel Target: Auto Actions: @selector (Disarktactactiview) ;; [Self present ViewController: animated nav: yes complete: zero];
I want to create a timeline with Google charts to show the duration, repetition, and overlap to show the event. Each line should be a new event and the column time should increase.
I see, though, and do not think what I want - not only is the length of a horizontal strip, but there are many ranks in the same line (non-overlapping) .
Is it possible with Chrome or any other free chart library?
Edit: I want to produce a chart similar to the one below
code here Is:
function drawVisualization () {// Create and generate data table Var data = new google.visualization.DataTable (); Data.addColumn ('string', 'assignment'); Data.addColumn ('Date', 'Dummy'); Data.addColumn ('Date', 'Current Assignment'); Data.addColumn ('Date', 'Dummy'); Data.addColumn ('Date', 'Next Assignment'); Data.addRows ([['Uranus', New Date (1298-2464000), {v: New Date (26082800000), f: '2 / 21-12 / 20'}, New Date (0) {V: New date (0), F: '1 / 0-1 / 0'}], ['Thomas Lamontzi', new date (1297036800000), {v: new date (6393600000), f: '2 / 7-4 / 22 '}, New Date (0), {v: New Date (0), F:' 1 / 0-1 / 0 '}], [' Shu Li ', New Date (0) {V: New Date (0), F: '1 / 0-1 / 0'}, New Date (1303689600000), {v: New Date (2937600000), f: '4 / 25-5 / 29'}] , [V] New date (4579200000), f: '2 / 21-4 / 15'}, new date (0), {v: new date (0), ['satin', new date (1298246400000) , F: '4 / 4-4 / 22'}, New York: Date (259200000), {v: New Date (2160000000), F: '4 / 25-5 / 20'}], ['Ric Maverick', New Date (1302652800000), {v: New Date (2592000000), F: '4 / 13-5 / 13 '}, new date (0), {v: new date (0), f:' 1 / 0-1 / 0 '}],]); // chart for date date date var dateMin = new date (2010,11,1); Var dateMax = new date (2012,0,1); Var date = new date (2012315); // Create and draw visualization. New google.visualization.BarChart (document.getElementById ('visualization')). Drag (data, {width: 600, height: 400, true: true, series} [[color: 'transparent'}, {}, {color: 'transparent'}, {}], hxis: {view: {max. : Date Max, Min: Date, Minute, Baseline: Date Today, Baseline Color: 'Red',},}); Basically, you create 4 series: - Dummy series (time till first assignment)
- The duration of the first assignment
- Dummy series (
- The second assignment period
Then you can set series 1 and 3 invisible.
For data, you have to calculate some dates (I did excel in Excel), but basically you get the duration by decreasing the start / end date for each assignment, and set it Dummy as the date of introduction of the second workgroup with the first assignment as well as the period of the first assignment.
I do the {value: x, format: y} move the mouseover to work properly, you can automate it (again, because I used to store the data in Excel My javascript used to take much longer). Then the settings set the minimum date, the maximum date, the range is considered appropriate color, and the base line is set in red. Unfortunately, for reasons beyond my understanding, baseline does not matter That date set wants to be on the left side of the chart. If you can find a way around it, then your chart is there.
मुझे इस कोड में एक अंक लगाना चाहिए:
$ select = new \ zend \ Db \ Sql \ Select; $ Select- & gt; ( 'स्कूल') से; $ का चयन करें- & gt; जुड़ें ('school_parent', 'school.school_parent_id = school_parent.school_parent_id'); $ परिणामसेट = $ this- & gt; तालिकागेटवे- & gt; चयन करें ($ चयन करें); वापसी परिणाम $ सेट; मैंने कोशिश की, लेकिन मैं इसमें शामिल होने की मेज से नहीं कर सकता।
कोई भी मेरी सहायता कर सकता है?
< ($ $ पृष्ठांकित) {// तालिका एल्बम $ के लिए एक नया चयन ऑब्जेक्ट बनाओ = चुनें = div = "post-text" itemprop = "text">
सार्वजनिक फ़ंक्शन fetchAll ($ paginated = false) {if ($ paginated) $ इस- & gt; getallAlbum (); // एल्बम इकाई $ परिणाम के आधार पर एक नया परिणाम सेट बनाओटेटप्रोटोटाइप = नया परिणामसेट (); $ परिणामस्वरूप प्रोटोटाइप- & gt; सेटअरेऑब्जेक्टप्रोटोटाइप (नया एल्बम ()); // एक नया पेजिंग एडाप्टर ऑब्जेक्ट $ paginatorAdapter = new DbSelect (// हमारे कॉन्फ़िगर चयनित ऑब्जेक्ट $ का चयन करें, // एडैप्टर को $ $- के बीच चलाने के लिए-> गेटवे- & gt; getAdapter (), // परिणाम पर सेट करें हाइड्रेट $ परिणामसैटप्रोटोटाइप); $ Paginator = नया पेजिनेटर ($ paginator एडेप्टर); $ Paginator वापसी; } $ परिणामसेट = $ this- & gt; तालिकागेटवे- & gt; चयन करें (); वापसी परिणाम $ सेट; } समारोह getallAlbum () {$ sql = नया चयन (); $ Sql- & gt; से ('एल्बम') - & gt; स्तंभ (सरणी ('आईडी', 'कलाकार', 'शीर्षक')) - & gt; जुड़ें ('एल्बम खंड', 'album.catId = albumcategory.catId' सरणी ('catName' = & gt; 'कैटनाम'), चुनें :: JOIN_LEFT); वापसी $ sql; }
At present, the code below gives compile annotations, because the audience does not know what SMS task is for the SMS Task in the listener Should be an example. Is it possible to do this without passing in it? If this happens, then it seems like a redundant: .createTask (SMS Tasks, New Functional Listener {SMS}} {...} The current code :
Public Zero Dustof () {Smartphone Task SMSTesk = Create SMSTyc (); SuperGetsSystem (). CreateTask (SMT Task, New Task Complex Listener) {@ Override Public Wide On Tesk Complaint () {Release Resource (SMSTask); // Error}}}}}} Private Smartphone Tasks vs. SMSTask () {Return new Smartphone Task}} createTask:
Zero create otask (Smartphone Tasks, Functional Listener Listener) << Code
You can specify the variable last : Last Smartphone Task smsTask = createSMSTask ();
As the color suggetsed text text background color and AutoCompleteTextBox Android does not show the same suggetsed text so My XML file is:
& lt; AutoCompleteTextView android: id = "@ + id / autoCompleteTextView1" Android: layout_width = "0dp" Android: layout_height = "wrap_content" Android: layout_weight = "2.4" Android: Background = "# ffffff" Android: ems = "10" Android: Text collar = "# 000000" & gt; & Lt; / AutoCompleteTextView & gt; and my manifest file is:
& Lt; Application Android: allowBackup = "true" android: icon = "@ drawable / ic_launcher" android: label = "@ string / app_name" android: theme = "@ android: style / Theme.NoTitleBar.Fullscreen" & gt; And my Java file was protected saved Crete (bundled zero Instansstet) {super.onCreate (savedInstanceState); SetContentView (R.layout.patient_registration);
// layout to get a reference to AutoCompleteTextView in AutoCompleteTextView TextView = (AutoCompleteTextView) findViewById (R.id.autoCompleteTextView1); // string arrow string [] Countries = {"Jane", "FB", "Mar", "Jun", "Kokok", "Oppo"}; // Create the adapter and set it to autocomplete the full array for ArrayAdapter & lt; String & gt; Adapter = new array adapter & lt; String & gt; (This, Android .R.Let.CompL_L_Lightime, Country); TextView.setThreshold (1); TextView.setAdapter (adapter); }
For android.R use instead android.R.layout.simple_dropdown_item_1line try. Layout.simple_list_item_1 - This works for me
Did the ruskit load relation object be created automatically by id and put them into core data?
Here is my JSONs
Waypoint:
{"Date": "23/09/2012", "places_ids": [1182, 1065, 1140, 1126]} < {"id": 1182, "name": "new-york", "temperature": 32} / Pre> I want to map the option not only on loading and option to load the resetkit, but all related place objects such as: "Restrict, please, load this point with the URL
... / api / waypoints /: id " and this pathway loads all the place objects from the URL
. . / Api / Places /: id Now there are 'places_ids' variable attributes and 'places' connections in the route point and it does not match those locations to load locations.
Wow is correct that the restaurant will not automatically go to the web and will get a place for you. At least it was in RestKit 0.1, you need to change your Jason the way you have to do something like this:
{"date": "23/09/2012 "," Places_ids ": [{" id ": 1182}, {" id ": 1065}, {" id ": 1140}, {" id ": 1126}]} To understand that place_ids represent any other object in your graph.
मेरे पास एक ऐसी गतिविधि है जिसमें ArrayList & lt; KNDrawingTOOL & gt; नामक allTools KndrawingTool नीचे है .. यह तुलनात्मक तुलना करता है और तुलना विधि ह्यू द्वारा मूल रूप से क्रमबद्ध रंग है। यह बहुत अच्छा काम करता है .. लेकिन मैं उस सॉर्टेड सरणी को लेना चाहूंगा और फिर उसे मूल्य से फिर से सॉर्ट करना चाहूंगा, हू ऑर्डरिंग को बनाए रखना है। क्या ऐसा करने का एक तरीका है?
कंड्राइंगटॉल <पूर्व> सार्वजनिक वर्ग केंड्रिंगिंग टूल का उपयोग करने योग्य & lt; KNDrawingTool & gt; {सार्वजनिक इंक आईडी; सार्वजनिक स्ट्रिंग का नाम; सार्वजनिक पूर्ण आकार; सार्वजनिक इंट रंग; जन इंट लागत; सार्वजनिक पूर्णता क्षमता; सार्वजनिक एंट राशि; सार्वजनिक स्ट्रिंग प्रकार; सार्वजनिक पेंट mPaint; सार्वजनिक कंड्राइंगटूल (स्ट्रिंग टूलटाइप, बूलियन फ्लैटटिप, इंट पेंटआईडी, स्ट्रिंग पेंटएनाम, इंट पेंट साइज़, इंट पेंट कॉॉलर, इंट पेंट कॉस्ट, इंट कैनकैपेसिटी, इंट बचे अमर)) {type = toolType; आईडी = पेंटआईडी; नाम = पेंटनाम; आकार = पेंट साइज़; रंग = रंगरंग; लागत = पेंट कॉस्ट; क्षमता = क्षमता राशिफल = शेष राशि; MPaint = नया पेंट (); यदि (प्रकार == "पेंट") {mPaint.setMaskFilter (नया ब्लरमास्कफ़िल्टर (15, ब्लरमास्कफ़िल्टर.ब्लूर। नॉर्मल)); } MPaint.setAntiAlias (सच); mPaint.setDither (सही); mPaint.setStrokeCap (Paint.Cap.ROUND); mPaint.setColor (रंग); mPaint.setStyle (Paint.Style.STROKE); mPaint.setStrokeWidth (आकार); } / * (गैर-जवाडोक) * @see java.lang.Comparable # compareTo (java.lang.Object) * / @ ओवरराइड पब्लिक इंट की तुलना करें (KNDrawingTool अन्य) {लॉग। V ("टूल", "सॉर्टिंग ह्यू" ); // वापसी (रंग- अन्य। रंग); फ्लोट [] एचएसवी 1 = नया फ्लोट [3]; फ्लोट [] एचएसवी 2 = नया फ्लोट [3]; Color.colorToHSV (रंग, एचएसवी -1); Color.colorToHSV (other.color, HSV2); वापसी ((इंट) एचएसवी 1 [0] - (इंट) एचएसवी 2 [0]); }} मेरे मुख्य वर्ग को बस कॉल संग्रह। स्रोत (सभी उपकरण); जैसे मैंने कहा कि ये सभी प्रकार की ह्यू द्वारा ... मैं एक दूसरा पास बनाना चाहता हूं, फिर उन्हें रंग के आकार को बनाए रखने के द्वारा मूल्यों को बदल दिया जाता है ..
आप अपना सॉर्टिंग 1 पास में कर सकते हैं
float [] hsv1 = new float [3]; फ्लोट [] एचएसवी 2 = नया फ्लोट [3]; Color.colorToHSV (रंग, एचएसवी 1); Color.colorToHSV (अन्य। कोलोर, एचएसवी 2); यदि ((इंट) एचएसवी 1 [0] == (इंट) एचएसवी 2 [0]) {रिटर्न (इंट) एचएसवी 1 [2] - (इंट) एचएसवी 2 [2]; } वापसी (इंट) एचएसवी 1 [0] - (इंट) एचएसवी 2 [0];
I am wondering how I can work together with each other and djangoRESTframework to work with each other Can get it. Currently, my model
from Melboksing import * imported periodically class blog (document): post_id = IntField (unique = true) title = Stringfild (max_length = 144, required = true) date_created = DateTimeField (Default = datetime.datetime.now) body = StringField (required = true) and I have defined the serializer
rest_framework Lists all blog posts from the .views import, or creates a new post "def" (self, request, format = none): post = blog But I error'm getting takes
typeError at / blog / __init __ () that one has been argued (2) Request Method: GET Request URL : Http://127.0.0.1:8000/blog/ Django Version: 1.5.1 Exception Type: Type Exception Value: __init __ () takes exactly 1 argument (2 given) which gives the following Tresebak
response = callback (request, * callback_args, ** callback_kwargs)
The purpose of the Django REST framework is Dja To work well with the ngo model, there is no replacement for the MongoEngine Django model, as you will need to define some more functions to play well with the Django Rest Framework.
If you need to create a framework for MongoEngine, then take a look at this instead.
If you prefer to use the DJJAA Rest Framework, it is entirely possible, although your blog list class is actually a view, not a serializer, first of all Define the serial category: Since the MongoEngine document is not a Django model example, you can call yourself serializers.ModelSerializer . This is the reason that restore_object is here from: Looking at a dictionary of deserialized field values, [this] will update the existing model example, or create a new model example. Then you can define your idea, eg.
From Rest_framework Import From Generics Models import blog category bloglist (generics.ListCreateAPIView): serializer_class = blogservalizer def get_queryset (self): return blog. Objs Again, Django REST framework expects some of the standard Django models that are not verified by the mongo-engine documents, so redefine the get_queryset method need to. then add to your urls.py:
url (r '^ blog /', bloglist.as_view (), name = 'blog-list'), < / Code>
The following filter query returns zero results (*: * as a query):
- Start date: [* to *] or start: [* So far / day + 1 day] But if I only filter them: < Pre> -startDate: <* * * * I get 3 results.
If I only filter by:
start date: [* to now / day + 1 day] I get 161 results.
Why is the Joint FQ returning zero results? I want the filter to return any doctor whose starting date is zero or the start date is earlier than today.
Edit: I'm using Solar 4.2.1.2013.03.26.08.26.55
Edit: Well, the strange thing is that a colleague advised to put brackets on two parts:
(- Start date: [* From *]) or (Start: [* So far / day + 1 day]) And somehow it worked. I am still curious why he made a difference? Hope someone can put some light.
Thank you!
Solar supports pure negative queries. They do this, essentially, by expanding the pure negative to something like:
*: * -startDate: [* TO *] < P> However, if you add it to boolean, I do not believe it applies more on this kind of argument, a negative query does not bring anything in Lucin, but rather other, positive, query words. Filters that have been matched. This is different from SQL queries, which in a sense starts with a complete table of *: * , or the result, and allows it to hold it down. I believe your or is being effectively ignored, because it is not strictly speaking, it is understandable in context. Generally, or is syntactic sugar, I believe ( field: this or region: that which is equivalent to the field: this field: he ). Therefore, your query in effect is: start date: [* so far / day + 1 day] -startdata: [* to *] , which results in you being more clearly visible gives . When you wrap it in brackets, then each word query is treated separately, and you gain access to the support of solr of single negative queries.
A better idea is to store a default value, if you need to search for the unset / null values *: * and thus the pure negative queries like this To scan the entire index in detail, and therefore to perform very poorly. Providing a default value will improve performance, and prevent such a misleading situation.