Posts

Showing posts from June, 2010

c++ - how to write a function Click() for dynamic created button? -

Trying to write a simple VCL program for educating purposes (dynamically form, control etc.) ). There is such a sample code: click __fastcall TForm1 :: button 1 (torque * sender) {TForm * formQuiz = new TForm (this); FormQuiz-> BorderIcons = TBorderIcons () & lt; & Lt; By System Menu & gt; & Gt; BiMinimize & gt; & Gt; BiMaximize; FormQuiz- & gt; Position = TPosition :: poDesktopCenter; FormQuiz- & gt; Width = 250; FormQuiz- & gt; Height = 250; FormQuiz- & gt; Visible = true; Teeton * BTNDAK.Tobin = New Tibetan (Form Conservancy); BtnDecToBin- & gt; Mother = form quasue; BtnDecToBin- & gt; Left = 88; BtnDecToBin- & gt; Top = 28; BtnDecToBin- & gt; Caption = "Dec to bin"; BtnDecToBin- & gt; Visible = true; } I wonder how I can write a function for a dynamic button, so it will be called when the button is clicked. In this example I click 'btnDecToBin-> ();' Funk but I do not know where I should p

c++ - How can I change the border? -

I create a simple window with wxwidgets How can I change the border? Also, how can I call deleted function (onclos) with the right arrow button press? #include & lt; Wx / wx.h & gt; Square _frame: public wxframe {public: _Frame (wxFrame * frame, const wxString and title); Private: Zero onClose (wxCloseEvent and Event); DECLARE_EVENT_TABLE ()}; BEGIN_EVENT_TABLE (_Frame, wxFrame) END_EVENT_TABLE () _Frame :: _ frame (wxFrame * frame, constant wxString & title): wxFrame (frame, -1, title) {} zero _Frame :: OnClose (wxCloseEvent & Event) {Destroyed (); } Class _App: Public wxApp {Public: Virtual Bull OnInit (); }; IMPLEMENT_APP (_App); Bool _App :: OnInit () {_Frame * frame = new_frame (0L, _ ("wxWidgets app template")); Frame & gt; Show (); Back true; } Right after the window closes on the item "itemprop =" text "> after the" div class = " Then there is a need: header file: zero onChar (wxKeyEvent & incident

html - relative and absolute positioning in IE and FF -

I think that when you add more content to it, it wants to be a division, at least the height of the viewport and one Title and a footer top and bottom sticking I came up with the following which works fine in IE7 but does not work in FF3. This HTML (mainly repeating 'multiple text') viewport): & Lt; / Div & gt; & Lt; Div id = "footer" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; Html & gt; This is CSS: * {margin: 0 px 0 px 0 px 0 px; Padding: 0 px 0 px 0 px 0 px; Border: None; Z-index: 10; Font-family: aerial; Font-size: 20px; Text-decoration: None; Align text: left; } Html, body {height: 100%; Background color: RGB (255, 255, 255); } #main_body {status: relative; Minimum height: 100%; Height: Auto! Important; Height: 100%; Margin: 0 px 20 px 0 px 20 px; } # Headers {Position: Absolute; Top: 20px; Left: 0 pixels; Height: 50px; Width: 100%; Background color: RGB (40, 40, 40); } # Cont

c# - How to custom format data in datagridview during databinding -

I'm looking at a way to format DataGridViewTextBoxColumn so that the value of the data bonded formatted during the database. For example, I have the property of the company name and I need to take 5 characters before the database name. I can hook and hook the loop through various datagrid view events (like added in rows) and all the rows, but I want to find more sophisticated ways to do this . Since I have decided to use the database, looping through data and modifying it have little against the databasing concept. What I'm doing after this, as follows, but add custom formatting logic: DataGride View 1 Column [colsoddate. Index] .DataPropertyName = "SomeDate"; ColSomeDate.DefaultCellStyle.Format = "yyyy"; I think I should implement the IFormatProvider, but I do not understand how I should implement it. dataGridView1.Column [companyName.Index]. DataPropertyName = "CompanyName"; CompanyName.DefaultCellStyle.FormatProvider = New Short

windows - "Nobody should be using MFC any more" Why? -

Is it true that "no one should still use MFC" and Why this? Of course, any ever should speak as MFC ) It has emerged since MFC 1.0). From Gupta's SQLWindows and Borland Delphi, there were always great techniques for developing GUI for a lot of Microsoft Visual Basic. And nowadays we have NET or, maybe more MFCs like, Qt. MFC was a series of hacks, and often deliberately misuse of C ++ language, of course, if you have a large MFC project, you might get stuck with it.

NHibernate CreateSqlQuery and object graph -

Hello, I am a newbie for NHibernate. I want to do a SQL query in the database by joining in three tables. I have many roles with many users. I am trying to start NHibernate with the object graph properly with the form object. For example, if I have 10 application records, then I need 10 app objects and then those objects have their roles that have users. What I'm still getting is a Cartesian product which resembles I have as many application items as in total user records. I've seen this quite a bit and I'm not sure if this is possible as the application hierarchy correctly I can only get flat items to come back. It seems that "possibly" is possible in my research that I have read about "GROUPED JOIN" and "hierarchical output", from which the upcoming LINQ with NHibernate release Yet I am a newbie. [Update Ayende post here is my guess based on Frans comment that is what I want to do it is not possible] Thanks for you time in advance.

Java Swing query -

I have a swing panel where I find the text and highlight it with a yellow color. Its size was 1/4 the screen (not sure about exact dimensions). When I search for the first active search and highlight and show and whenever I maximize the screen in full size, the highlighted text is not visible. Now the highlighted text is no way for everyone to see This helps: / P>

c# - How can I apply MVVM and Commands in this specific WPF situation? -

I have trouble with the MVVM pattern and command in my WPF app. The problem is not so much that the MVVM pattern, but more than the stuff that is running on my GUI. I will explain the situation: My app can be in some files I have a class with the function DoStuff (int limit) My user user interface has the following items: < / P> button DoStuffBtn to start parsing. A text box LimitTxt to fill a limit. Enable or disable a checkbox . When you uncheck " LimitChk , then LimitTxt.Text =" " and LimitTxt.IsEnabled = false . You will repeat "check" LimitChk , then LimitTxt.IsEnabled = false , but the text remains empty until you fill something . I have read several tutorials on the command in WPF and MVVM but I do not think that my case would be inserted in that mold. The example I have given is actually a small part of my UI Is but I can not do this very well. I am going through such questions as: Do I have to command f

c++ - Extract multiple words to one string variable -

std :: stringstream कनवर्टर ("टॉम स्कॉट 25"); Std :: स्ट्रिंग नाम; इंट उम्र; कनवर्टर & gt; & gt; नाम & gt; & gt; उम्र; यदि (कन्वर्टर.फ़ाइल ()) {// यह निश्चित रूप से विफल रहता है} मैं एक स्ट्रिंग चर में दो या दो से अधिक शब्द निकालना चाहता हूं I अभी तक मैंने पढ़ा है, ऐसा लगता है कि यह संभव नहीं है। यदि हां, तो इसे कैसे करें? मुझे नाम की संख्या (आयु) से पहले सभी अक्षर प्राप्त करना चाहते हैं। मुझे sscanf का उपयोग करने में सबसे अधिक आरामदायक महसूस होता है, लेकिन मैं स्पष्ट रूप से नहीं कर सकता। मुझे जो कुछ चाहिए, उदाहरण के लिए उम्र से पहले सभी शब्द निकालने की क्षमता है। अभी तक पोस्ट किए गए समाधानों में से अधिकांश वास्तव में विनिर्देश को पूरा नहीं करते- कि उम्र के सभी डेटा को नाम के रूप में माना जाएगा उदाहरण के लिए, वे "रिचर्ड वान डे रोथस्टीन" जैसे नाम से असफल हो जायेंगे। जैसा कि ओपी ने नोट किया है, scanf के साथ आप ऐसा कुछ कर सकते हैं: scanf ("% [^ 0-9] % D ", नाम, & amp; आयु); , और यह इसे अभी ठीक पढ़ा होगा। मान लें क

asp.net mvc - mvc - show/hide stuff based on what view it is for a user control -

I am using asp.net mvc. I have a very similar form using a user control for the form, which is such a compose and edit form. And placing it in each scene. The form of editing this form is slightly different as it has some extra text and a link. How do I show / show it I will either put it in the model (i.e. "icededod" or "iaditoded" or "isadmode" parameter) or, better yet, through ViewData Pass: & lt;% ViewData ["isEditMode"] = true; Html.RenderPartial ("FormView", Model); & Gt%; Then just check the IsEditMode value in ViewData

bypass attr_accessible/protected in rails -

I have a model, when instantiates an object, then creates another object from the same user id. Square Fu & gt; ActiveRecord :: Base after_create: create_bar Personal Def create_bar Bar.create (: user_id = & gt; user_id # and other attributes) In the end end in Bar.rb to protect me from hackers Attr_protected. class bar> ActiveRecord :: Base attr_protected: user_id, created_at ,: updated_at end Now it stands as I appear to disable attr_protected or to create a new bar object without having bar object Can not User_id be empty ... How do I accept bar objects: atti_protected without losing security from foo to user_id attribute? Try : def create bar = bar Build (... other parameters ...) bar.user_id = user_id bar.save! End

c - Can I return double * in function? -

Can I do something like this? Will this work? double * vec_subtraction (char * a, char * b, int n) {double * result; Int i; For (i = 0; i & lt; n; i ++) results [i] = one [i] -b [i]; Return result; } and then in the main: double * vec = vec_substraction (a, b, n); For (i = 1; i & lt; n; i ++) printf ("% d", vec [i]); A and B elements have the same number of vectors, n is the number of elements. Yes you can, but you can send anywhere results to memory Need to allocate. Actually, you can either make it static or dynamic if you allocate it out, either outside of vec_subtraction or vec_subtraction . If you are going to allocate in: double * vec_subtraction (char * a, char * b, int n) {double * result = malloc (sizeof ( Double) * n); Int i; For (i = 0; i & lt; n; i ++) results [i] = one [i] -b [i]; Return result; } and in the main: double * vec; // ... vec = vec_subtraction (a, b, n); // ... Free (VCC); Do not forget to call free

multithreading - Is good multithreaded design premature optimization? -

Unless I like the intellectual challenge coming from the design of multicore system, I know that most of them are unnecessary Were customizable before. / P> But on the other hand usually some functionality is required in all systems and it is not difficult to reconstruct or even just financially later in multithreading safe operations because it is a combination of other algorithms Full rewrite will happen. What's your way to optimize and balance things? I also believe in threading adheres to the rules of optimization. That is, do not waste time in making your time parallel to the quick operation. Instead, apply threads that take a long time to execute. Of course, if the system starts 1000 + core, then this answer can be obsolete and it needs to be modified. But then, if you are going to "work", you definitely want to ship your product before that.

ruby on rails - loaded? always returns true for belongs_to associations? -

मेरे पास कुछ भूगोल संबंधित वर्गीकृत परिभाषित निम्न प्रकार हैं: class स्थान & lt; ActiveRecord :: बेस एंड क्लास राज्य & lt; स्थान है_मालक: भौगोलिक क्षेत्र में है: शहरों में है: शहरों में काउंटी का अंत वर्ग काउंटी & lt; स्थान is_to: राज्य has_many: भौगोलिक है has_many: शहरों, के माध्यम से = & gt; : भौगोलिक,: uniq = & gt; सच अंत वर्ग सिटी & lt; स्थान से संबंधित है: राज्य है has_many: भौगोलिक है has_many: counties,: through = & gt; : भौगोलिक,: uniq = & gt; सच अंत वर्ग भूगोल & lt; ActiveRecord :: बेस is_to: state is_to: city is_to: county end निम्न कंसोल आउटपुट मुझे लगता है कि समस्या को दर्शाता है। & gt; & gt; County.first.cities.loaded? = & Gt; झूठी & gt; & gt; County.first.state.loaded? = & Gt; सच लॉग में देख रहे हैं मैं देख रहा हूँ कि जब मैं राज्य को कॉल करता हूं। लोड हो जाता है? यह राज्य को लोड करने के लिए एक एसक्यूएल स्टेटमेंट चलाता है, अर्थात् राज्य तब तक लोड नहीं हुआ जब तक कि मैंने इसे छुआ। हालांकि, जब मैं शह

c# - How do I execute a block of code with PostSharp when the application exits? -

वर्तमान में, मैं विधि नाम को OnMethodBoundaryAspect.OnExit विधि में जाँच रहा हूँ: [ सीरियलिज़ेबल] पब्लिक क्लास टाइमर ऍटिट्यूड: OnMethodBoundaryAccpect {सार्वजनिक ओवरराइड रिक्त ओएनएक्सिट (MethodExecutionEventArgs eventArgs) {यदि (eventArgs.Method.DeclaringType.Name == "प्रोग्राम" और amp; eventArgs.Method.Name == "मेन") // do things }} जाहिर है, यह बदसूरत है और कुल्डी लगता है। क्या PostSharp के साथ आवेदन बाहर निकलने का पता लगाने का एक और मजबूत तरीका है? मुझे नहीं लगता कि आपको उपयोग करना चाहिए ऐसा करने के लिए PostSharp। आप पता लगा सकते हैं कि क्या एप्लिकेशन डोमेन सिस्टम .AppDomain की कुछ विशेषताओं का उपयोग करके बाहर निकल रहा है: AppDomain.IsFinalizingForUnload () < Li> AppDomain.ProcessExit AppDomain.DomainUnload

.net - Class 'CLSID_CorSymWriter' could not be created: Access is denied -

I'm getting this error. Not sure what it is. This I have done so far Working on VISTA and IIS7 I have created a new site and have a directory attached to my ASPX files. So I converted a subfolders to an application. But for some reason when I try to start that application (browse right click) I get the following error - Class 'CLSID_CorSymWriter' can not be created: Access is denied. Why Access is Denied This application works on the parent system, but not here. So let me know its some permission problem or havent some component I have installed yet. Any advice? I have also found this problem and it is c: \ WINDOWS \ Microsoft.NET \ Framework \ v1. The machine present in the 0.3705 \ CONFIG folder Resolved by changing to Config Set the user name and password Administrator user admin and user for password procedure section

iphone - How can I programatically set a TableView to be grouped -

I have been trying to trying to set up your tableview dynamic froma configuration file and override the template code are - (id) initWithStyle: (UITableViewStyle) style {initWithStyle override //: If you can make as a controller program and optimize want to perform viewDidLoad is not suitable for Are there. JeanieAppDelegate * appDelegate = (JeanieAppDelegate *) [[UIApplication shared application] delegate]; If (self = [super initWithStyle: (UITableViewStyle *) appDelegate.skin.tableViewStyle]) {// 1 if (self = [super initWithStyle: UITableViewStyleGrouped]) {// 2 if (self = [super initWithStyle: style]) { } Healthy return; } 2 worked on the lines of the comment (neither 2 is the one that comes with the template). I using default Aanm your variables are defined below: @interface skin: NSObject {UITableViewStyle * tableViewStyle; } @property (nanatomic) uTitablesVustible * tablewishstyle; @end However my code should return an inconsistent type error, any idea why ?!

java - How to center a ImageView vertically in its parent? -

A TextView with the right long text and a visual image of my layout design Tekstwu. I ImageView want to center vertically his parents, so I've used Android: layout_centerVertical = "true", but it turned out that ImageView was tied under his original. If I do not use the layout_centerVertical property, then ImageView will be aligned at the top of its original. How can I solve this problem? Thank you. & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Relative layout Aksmelan: android = "Http://schemaskandroidkcom/apk/res/android" Android: Leaut_vind = "Fel_perent" Android: Leaut_heit = "wrap-content" android: background = "# 000000" & gt; Android: layout_alignParentRight = "true" android: background = "Android: Android: Android: Leaut_vidth =" wrap-content "Android: # Ff0000" android: layout_centerVertical = "true" Android: scaleType = "c

asp.net - Video Conferencing Intergration -

I have seen this post :. I do not see what I want from there, so perhaps to see a fresh post that there is any suggestion. I'm looking for a video conferencing tool that can be integrated into an ASP.NET web application. Webform or MVC is not watching for free, on some lines, on the basis of Gulmatting . Any help is appreciated. Thank you After some research, I have not fully featured static video conferencing library for integration. Found, but I did get some better solution. Available to integrate API services into both Adobe Connect and GoToMeeting. Not technically integrated, I believe this is a fair solution. Do not try to change the wheel or video conferencing software again.

How to return a Readonly BindingList -

I have an existing class that has a list and I need to change this list to a binding list, but class There is no property to return a redline compilation of this list. It is important that this list be modified only in this class. Now I have to change this list to a compulsory list so that if I change the list I can be notified in another category. To convert this list into another category, databasesource.com. The only way to set up datasource is to provide the property that gives this binding list, but it will highlight the list and raise the read only capability. Is there a way to set up DataBindingSource.DataSource in another category and prevents the list from exposing other classes. The sample code below is // Existing Code Public Class Message Manager {list & lt; Message & gt; MessageList = new list & lt; Message & gt; (); Public readline calling & lt; Message & gt; Readonly Message List {Received Message List.Seride Only (); }}} // wants to conver

cocoa - Testing if an application can open a specific type? -

On Mac OS X, how can I tell if a given application opens a specific type? I have two UTIs which I am interested in: public.text and public.image and I have a list of applications. I want to filter the list of those two types, so I have a text viewer List and image is the list of visitors. I have seen the question related to them, where it is possible to get a list of all the types of documents I can do, and I can get the intersection of the set, I am able to ask separately. Is there any cocoa or carbon call in it? If you want a list of applications for a given document type, use. If you want a list of documents for specific application type, application information. Open the program file and read the key.

Sql server takes too long time for update query to execute for few rows -

UPDATE table1 SET col1 = 'True' This query takes more than 30 secs for approximately 6000 records. Why is it very slow? Do you have a trigger? See more here also my answer is here:

scripting - PHP - Does session_unset unregister $_SESSION vars? -

Does all $ _SESSION unregistered works, or do you manually add variables registered in the $$$$ CRSAR To clean? I am confused about it because the PHP documentation says: Use session_unset () for old old dislike code which does not use $ _SESSION . If $ _SESSION is used, a session variable Yes, it removes all sessions. session_unset - Free All Session Variables Vars, you can also use it to remove all sessions: session_destroy (); Sometimes you may have a problem, even if session_unset and session_destroy are both used. You have to clean the $ _SESSION array. session_unset (); Session_destroy (); $ _SESSION = Array ();

.net - Generate C# automatic properties with Codedom -

क्या कोडितोम या के साथ C # स्वचालित गुण उत्पन्न करने का एक तरीका है शायद हो सकता है libreries का दूसरा सेट उपयोग कर सकते हैं? कोडडॉम को किसी प्रकार का होना चाहिए, जिसे कई भाषाओं में परिवर्तित किया जा सकता है (आमतौर पर सी # और VB.NET)। इसलिए, आपको ऐसे कोड नहीं मिलेगा जो कि कोडडॉम में एक विशिष्ट भाषा की वाक्य-रचनात्मक चीनी हैं।

javascript - execute a jquery plugin? -

I have found a plugin that is connected to a selector. a button. And when I click on the button the function is executed (showing a window where I can select an image to upload). The code looks like this: $ ('#image_upload') uploadfire ({'Uploader': '../../frontend/jquery/plugins/uploadify /swf/uploadify.swf ',' script ':' controller / ajaxcales / image.php ',}}); Then it is connected to a button with id = "image_upload". But this button will give a different look and I do not want this. I want to show a regular button. So I thought I could use it regularly and when I click on it, it executes the uploaded plugin. Is this possible? Take a look at this as far as I understand, option setting wmode: 'transparent' Hide Flash-Chees and make your original button visible < P> You can also see a look at the button Tag button Hide the hide button rollover width height height option which lets you sty

linux - sc_trans metadataPattern -

metadataaptern Metadata is not present if the pattern used to remove metadata by a file name % For Unix /% N. and the default for \% N %. N = song name % g = style % a = album % art = artist % = year of four digits% =% sequence of points %% = % Character [] = bracket optional element (no nesting) * = string = other letter matching exactly Pattern matching is done right from left. Example: Pattern = /% R /% Y% A / Audio / [% # _]% N path = / home / nradisch / songs / absence of masks and wigs / 1969 things past / audio / 03_The Royal Blues.mpee 0 Result: The Armo of Past Things - Artist Masks and Wig Songs Royal Blues Years of 1969 My question is how can I dispose it / var / radio /% folderNAME% / *. * , it will have to ignore all other folders which can be inside % folderNAME% . If you know sc_trans and there are other solutions to make it, then it will not display the title of the song and will display a custom name that will also be nice.

algorithm - Are unescaped user names incompatible with BNF? -

I have got a (proprietary) output from software that I have to parse. Sadly, there are unknown usernames and I want to know my hair whether I can explain the files to use a BNF (or EBNF or ABNF), can tell what I do Can i The problem, exaggerated (this is actually just an example), can look like this: (data) :: = & lt; Username & gt; & lt; Username & gt; : = (Other types of data) And in some cases, instead of looking at the left or right side, the user name can also appear in the middle of a line. The problem is that the username is unexpected and there is not enough restriction on the user names (they are printable ASCII, maximum 20 characters and they can not contain line breaks). Therefore "=" will be a fully valid username, for example. And therefore "= 1 = John = 2" (because the user, in sign-on, where they were allowed to choose any user name and they appear unnecessary in my output). I 'm asking because my parser succumbed to

iphone - How to visualize (and not pick) image from the Camera Roll -

I would like to visualize the images from the camera roll to your application. Album something with the app that lets you zoom and pan images I tried to use as SourceType with UIImagePickerControllerSourceTypeSavedPhotosAlbum the UIImagePickerController, but unfortunately if an image was then tap the picture Finnishpiking Meediavith Infon Is selected with. Thank you I believe that the image picker is currently the best in get. If you want to zoom and panning You must enter your code ( UIImage has been returned to the image picker.) Using.

ruby on rails - How to set routes.rb for ONLY controller and view object? -

I have a controller called store_controler, and the view for the store. But the store does not have a model, but I want to use store_path in code. If you are only a store (without id), then how can I add Store_path to the routes. RB? store so you can edit the store_path ): map.resource: store ,: only = & gt; [: Show] You can also create a custom path: map.store "/ store" ,: admin = & gt; "Store",: Action => "Show"

native - FileDescriptor's actual system file descriptor (as int) in Android -

What is the file descriptor object from Android that can get system file descriptor (as socket or file number as int)? I want to access the file descriptor directly in JNI code without using any Java wrapper Edit:. I have found getParcelFileDescriptorFD and the file descriptor is the use of the "descriptor" name in the field "example", example /jni/android_media_MediaPlayer.cpp , function definition frameworks / base / core / jnI / android_util_Binder.cpp < / Code>, the field is only in libcore / luni / src / main / java / java/io/FileDescriptor.java but this official document is not part of the API . Is there a document "correct" way to do this? local code in Dalvik / libcore / jniGetFDFromFileDescriptor Java_io_fileDescriptor.c , but you should not call it yourself because this is not a static API You can copy & amp; Paste that code, but before you do this, you really want to think twice. Using JNI to use the implementation

c++ - Manipulating scrollbars in third-party application -

I need to create an application that does the following: In the beginning we have notepad windows It is open with lots of text in it. Our application should scroll through this file and after each scroll operation, you will need to take a Notepad Window screenshot. I call it SBM_Greetings, SBM_GetterGen, SBM_SETOPOS but it does not work for me. Please note that imitating keyboard events (such as PageDown, PageUp) is not an option for me because this application should also work with other applications which can be used to tie the keyboard shortcut scroll. Thank you. Do not try to manipulate scrollbars instead of setfocus () instead of text-page, then page Send down message. If there are apps where you manipulate the scrollbar, you should keep the window open and send the message there.

html - jquery remove parent not working on dynamically created divs -

A mouse is trying to use jquery to remove its parent div. My markup: & lt; Div class = "web_store_fields" id = "web_store_input1" & gt; & Lt; P & gt; & Lt; Label = "web_store_address []" & gt; Store address: & lt; / Label & gt; & Lt; Input name = "web_store_address []" class = "web_store_info" type = "text" value = "http: // www." Size = "35" /> & Lt; Input class = "button_remove_web_store" type = "button" value = "remove" /> & Lt; / Div & gt; jquery div Removal code: $ ('.button_remove_web_store'). Click (function () {$ (this) .parents ("div: first"). Remove ();}); This works fine for that div that happens in html when the page loads, but the user is dynamically created for the device (using this jquery code Click on (): $ ('# button_add_web_store') click (function () {var num

cocoa - NSURL URLWithString: is null with non-english accented characters -

मेरे पास निम्न स्ट्रिंग है ... NSString * googleSearchString = @ "http: //www.google.com/search?q=lyrics+%22Tænder+På+Dig%22+%22Jakob+Sveistrup%22 "; ध्यान दें कि इसमें कुछ उच्चारण अक्षर हैं जब मैं उस url में लौटने की कोशिश करता हूं तो लौटा यूआरएल रिक्त होता है ... [NSURL URLWithString: googleSearchString]; तो आम तौर पर यूआरएल स्ट्रिंग में गैर-अंग्रेजी अक्षरों को उच्चारण किए जाने के अलावा काम करता है। इसे कैसे संभालना है पर कोई भी मदद? इसे ठीक से काम करने के लिए आपको विशेष वर्णों से बचने की आवश्यकता है ऐसा कुछ: [NSURL URLWithString: [googlSearchString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];

c - GMP convert mpz to mpf -

I am using GMP, and I am using a mpz with a MPF < / Code>. I looked through the library and could not find much. The best thing I could think was: mpz_t x; / * Insert a code here which specifies the value for x * / four buffs [size]; Gmp_sprintf (buf, "% zd", x); Mpf_t y; Mpf_set_str (y, buff); This solution requires a string and repeated conversion from it. Also, it is limited by SIZE , and I have no way of deciding that large SIZE needs to be done is a better way of converting it ? mpf_set_z (mpf_set rp, mpz_t op) ? In addition to this (I think that you have done this) your MPG and MPF variables are mpf_init (mpf_t x) and Mpz_init (mpz_t x) . Then you will do this: mpz_t x; Mpz_init (x); / * Insert here some values ​​that are x * / mpf_t; Mpf_init (y); Mpf_set_z (y, x);

ruby on rails - ActiveRecord has_many where two columns in table A are primary keys in table B -

मेरे पास एक मॉडल है, युगल , जिसमें दो कॉलम हैं, first_person_id और second_person_id और अन्य मॉडल, व्यक्ति , जिसका प्राथमिक कुंजी person_id है और उसमें स्तंभ नाम यहाँ मैं चाहता हूं कि उपयोग किया गया है: # उत्सुक लोडिंग के लिए 'व्यक्ति' मॉडल को शामिल करना, यह मेरे लिए महत्वपूर्ण है c = युगल.फंड (: सभी,: शामिल = & gt;: व्यक्तियों) [0] "# {cfirst_person.name} और # {c.second_person.name}" डालता है तो मैं यह कैसे कर सकता हूं? युगल में घोषित संबंध इस तरह दिखना चाहिए: class युगल नामित_स्स्कोप: with_people, {: शामिल = & gt; [: प्रथम_प्रमुख,: दूसरे व्यक्ति]} संबंधित_तो: प्रथम_परिवर्तक,: class_name = & gt; 'व्यक्ति' belongs_to: second_person, class_name = & gt; 'व्यक्ति' अंत # यूसेज: युगल.विंडो_ लोक.पहले # = & gt; & Lt; युगल ... @ फर्स्ट_पेडर: & lt; व्यक्ति ... & gt ;, @second_person: & lt; व्यक्ति ... & gt; & gt; उन व्यक्ति में ये निर्भर करते हैं कि क्या एक व्यक्ति एक से अधिक का ए

c# - How to set property in IDataErrorInfo validator from Xaml -

When using the IDataErrorInfo in WPA, there is a way to pass the parameter to the validator. For example, I have a compensation date picture, if valid for a new job, I want to restrict the date of permission for today or later, but when I need to allow date before the date for editing , Because no work can be edited, which has been done before. My date picture in Xaml (.Net 4.0) & lt; Date picture selectedData = "{Binding Path = Selected Issue.Issadet, Valid Ondaator Errs = True}" /> My IErrorDataInfo Namespace OITaskManager.Model {Public partial class problem: IDataErrorInfo {// I want to make these values ​​public from Xaml DateTime minDate = New date time (200 9, 1, 1); Public Date Time Maximum Date = New Date Time (2025, 12, 31); Public String This [String columnName] {Receive (if the column name == "is issued") {If IssDueDate & lt; minDate || IssDueDate & gt; maxDate) {Return "Due Date" + minDate.Date + " Should be l

java - Where should I put an external JAR file in my Eclipse project? -

I have created a new project in Eclipse and I want to include the ANLR jar file. Where can you usually keep your jar files before referencing your project? Do you make a "source directory" in Eclipse, or a general "directory"? Do you refer to them from there? I want to be able to easily transport this project and I do not want to declare references to jar files outside of my projects, but I am not sure what the general conference is going to do in the Java world. . Any guidance will be appreciated. I usually have a LIB directory in which I put all the third party JARs, I ask Jars to add my compilation and Runtime ClassSpace. I believe this is the right click on "Project", select "Build Path> Libraries", and then change CLASSPATH I'm sorry I'm not even more specific, but I do not use Eclipse I do I like IntelliJ, but this idea is similar to all Java IDE.

php - Urls for results of Ajax requests -

Hi guys, I have developed a Google map application, which is a clean search feature - though I have seen that I want to Some people who Facebook friends have done as a hardlink to the page generated from the AJAX query. For example, you click on a link in Facebook and it engages in the current URL and you can paste the new URL to get the requested page ... How do I apply it ... You can use location.hash (part of the URL after #) to set "hard link" with javascript This is not the reason for reloading the page, such as changing the location.href , but you can get the value and use it in javascript. Consider this example: & lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 // N" "http://www.w3.org/TR/html4/strict.dtd"> & Lt; Top & gt; & Lt; Title & gt; Hash test & lt; / Title & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; & Lt; Scr

c# - How to change toolstrip overflow Priority -

I want to design a componet, it works like win7 explorer's directoy bar, this toolstuff item will be assigned to all the directors. To reflect, I will do this. But when the width of all the componet width is over, it will overflow some buttons. Firstly, the most left button will unfold, namely it will overflow the most accurate button, I will How can? Html>

c# - Check existence of a record before returning resultset in LINQ to SQL -

I'm looking for a simple solution to change my standardized junk method by trying to get data Whether or not a record exists before. At present, whenever one of my methods is called, I do something for its effect ... Private Recognition Dosoming (Int ID) {if (Data records. Count (q = & gt; Q.Id == ID) & gt; 0) {Return Data Records First (q = & gt; q.id == ID); } Return tap; } ... where I always check the count of records to determine the existence of a record. There should be another "elegant" way to do this without calling the database twice, is there any way? There are several clean ways to handle this. If you want to first record related to id then you can say: record record = data. Record. FirstOver Default (R = & gt; RID == ID); If you want to know only if there is any such record : return data . Records. Annie (R => RIID == ID); // If true, then If you want to see how many such records exist: return data. Calc

asp.net - Web.Config transformations in the debugger -

When you run an application in a debugger, then it's based on your build selection. Changes to config do not apply. Is this the case or am I forgetting something? It seems that if I publish local IIS, then it is working fine, just do not seem to work in the debugger. After saving the web.config, you will find that the browser After applying the full refreshing "ctrl + f5" (not always necessary indeed) & lt; Compilation debug = "true" & gt; HTML>

javascript - Strange bug with OpenLayers + CloudMade -

I'm trying very simple, you can see a demo here: This bug only Appears in Firefox, to see that once it presses one of the links (this will take you to NY or Israel) then press the other link. The bug is that it will not show me the tile in that place, instead it will Will show the background of div. In PS PS it works randomly. I do not know if this is a clue or it can confuse you, if you press the "watch the world" link by pressing the NY or Israeli forces, it will allow you to see the other location .. For complete source reference tiles are invisible when myMap_OpenLayers_Container has the following CSS: Position: Absolute; Z-index: 74 9; Left: -2.02815e + 7px; Top: -2007340 px; If you change them, you can see that the correct tiles were full, so its likely JSWaddled can mess with them. Tile CSS also has strange values ​​when they are not shown Update : Problems also result from testing locally, so that JSFDL Turns out ( updateCSS = func

Ruby on Rails: Initializing instance variables with helpers in view -

I am running on the issue of some type of scope, which is called visual variables, # sample_controller.rb class sample controller & lt; ApplicationController def TEST & End # application_controller.rb helper_method: Not Defined Display DIF Display? @ Display Return @ display = "A" and return @ display + = "one" end and # test.html. ARB & lt;% = display% & gt; & Lt;% = Display% & gt; & Lt;% = @ Display% & gt; & Lt;% = @ display.reverse% & gt; When the sample / test is displayed, it dies with the error of "evaluating the reverse." This is surprising because the first two calls to be displayed should have been started @desplay I would have thought if is removed, the output is "AA", which indicates That the @ display instance variable is being determined by the subsidiary method, but there is no access to it in its view. If the controller is modified (with the original view code): class sample c

Type-inferring a constant in C# -

सी # में, निम्नलिखित प्रकार का अनुमान काम करता है: var s = "abcd" ; लेकिन क्यों चर एक निरंतर है जब प्रकार का अनुमान नहीं किया जा सकता है? निम्नलिखित एक संकलन समय अपवाद फेंकता: const var s = "abcd"; // & lt; = संकलन समय त्रुटि: // अनियमित रूप से टाइप किए गए स्थानीय चर स्थिर नहीं हो सकते हैं < Blockquote> मैं वास्तव में उम्मीद कर रहा हूं कि Lippert द्वारा चबूतरे और प्रश्न पर एक नज़र डालता है अगर कुछ ऐसा है जो आप मेरे ध्यान में लाए, तो आप अपना नाम पाठ में छोड़ सकते हैं - कोई टिप्पणी नहीं - और मैं इसे अंततः मिलेगा या बेहतर, आप @ एरिकलेप्टर पर "ट्वीट कर सकते हैं" ध्यान दें कि यह एक सेवा स्तर समझौते का गठन नहीं करता है; मैं अपने खाली समय में ऐसा करता हूं। क्यों चर एक निरंतर है जब प्रकार का अनुमान नहीं किया जा सकता है? "स्थिर" और "चर "हैं विपरीत const var मुझे टाइप करने के लिए शुडर्स देता है एक निरंतर एक ऐसा मूल्य है जो कभी भी बदलता नहीं है और इसमें कोई भंडारण स्थान नहीं है; एक चर एक भंडारण स्थान ह

How can I remove a file from my svn working copy without deleting it? -

I accidentally added a file to my svn job that I do not want to check (a test image). I have not committed any commitments yet, so how can I remove the file from the copy of my SVN work without removing it? file name

bash - How to pipe a here-document through a command and capture the result into a variable? -

Now this value is required on stdout. How can I capture it in a variable, so that I can use it in the other script? Prerequisites: The script needs all in one file. If possible, I do not want to write a temporary file . #! / Bin / bash cat & lt; & Lt; EOF | XSLTProx - ../pom.xml | Tail-1 & lt ;? XML version = "1.0"? & Gt; & Lt; Xsl: stylesheet version = "1.0" xmlns: xsl = "http://www.w3.org/1999/XSL/transform" & gt; & Lt; Xsl: template match = "/" & gt; & Lt; Xsl: Select Value = "/ Project / Version" /> & Lt; / Xsl: Templates & gt; & Lt; / XSL: stylesheet & gt; EOF It starts working (based on the answer to Ignaceo). Using a subshell here-papers are pipe right in the XSLTproc, while it is crossed even after tail. VERSION = $ ((xsltproc - ../pom.xml | tail -1) & lt; EOF gt;

math - Java Clustering Library -

I am looking for a light weight clustering library in Java. I do not need more than 100 clustering in that library, only 5 to 7 elgo will be fine for me. I'm sure, you are going to ask: "What type of separation do you need and what purpose" :). With the help of clustering I need to classify my data, for example, Kashmir means. PS: I know about, but I do not want to use it because it is not just for clustering. view in Apache's Library.

dom manipulation - Moving around jquery ajax loaded content to be reusable -

I have several links that point to a single AJAX URL. I can load it for each request in a single #DIV with the pattern: Load and remove for each link Now whenever I need a URL, I delete and request again I am trying to avoid the process. I have two scenarios, still need inquiries and badly suggesting them: create separate containers #DIVS so that they can detect this in each DIV Can not fight while loading a URL and go ahead (without destructive / removal) without hiding and showing regularly. This means that each link request loads the same AJAX in one container and the same AJAX in each container. #Type is very tedious, because each link once loads AJAX. Create a single #DIV and go ahead this is # DIV (the same class containing, .jax-container). So what I'm trying to achieve is a reusable and efficient code. Any suggestions and examples will be highly appreciated UPDATE, what has been done to clarify my question: $ ('a.browse'). Click (function

Do any good libraries and/or tools exist for automatic image "merging"? -

I am looking for a device or library that will allow me to merge two source images very quickly and one Will produce a third, the merged image in a file. My source data has two images in different formats (JPG, PNG, PDF, etc.), and the instructions that identify which part of the images to overlap / merge. I mean any type of transition effect in another - overlap with an image at the very top, at the very least end, for the fun things, such as the combination of automatic colors and shapes . I do not have a priority in terms of language and / or platform. = "Text">

dynamic - Dynamically assign special methods to objects but not classes in Python -

मैं निम्न कार्य करना चाहूंगा: वर्ग ए (ऑब्जेक्ट): पास = ए () एक .__ int__ = लैम्ब्डा आत्म: 3 मैं = इंट (ए) दुर्भाग्य से, यह फेंकता है: ट्रेसबैक (सबसे हाल ही में कॉल अंतिम ): फ़ाइल "& lt; stdin & gt;", पंक्ति 1, & lt; मॉड्यूल & gt; TypeError: int () तर्क एक स्ट्रिंग या एक संख्या होनी चाहिए, नहीं 'ए' यह केवल काम करने के लिए लगता है अगर मैं क्लास ए को "विशेष" विधि आवंटित करने के बजाय एक उदाहरण इसके बारे में क्या कोई सहारा है? एक तरह से मैंने सोचा था कि: def __int __ (स्वयं): # कोई असीम लूप अगर प्रकार (आत्म) .__ int__। Im_func! = धन्यवाद। धन्यवाद। पायथन हमेशा क्लास पर विशेष विधियों को दिखता है, उदाहरण के लिए नहीं (पुरानी, ​​उर्फ ​​"विरासत", वर्गों की तरह - वे नापसंद हो गए हैं और पायथन 3 में चले गए हैं, क्योंकि इस तरह की शब्दावली की वजह से अधिकतर उदाहरणों पर विशेष विधियों को देखने से आता है, इसलिए आप वास्तव में नहीं उनको उपयोग करना चाहते हैं, मुझे विश्वास करो! -)। एक विशेष वर्ग बनाने के लिए, जिनके उदाहरण

java - Issues with playing sounds on the BlackBerry -

I am having the following problem while playing the sound on Blackberry: The application is hanged for ~ 500 ms (not when the player is created, when the sound is actually played) There is a delay rather than the call and the voice I tested on a physical device other than the simulator. On the simulator, there should be a bug, because this v Seconds before the car starts (I've heard that it is a problem with the simulator, so ...). I have also tested. Wav vs mp3 files, and it gives pretty much the same results. Here is the code I use to load a player: stream = new object (). GetClass () GetResourceAsStream (fileName); Results = javax.microedition.media.Manager.createPlayer (stream, fileName.endsWith (".wav")? "Audio / x-wave": "audio / mpeg"); If (prefetch) {result.prefetch (); } I then store the player reference, which I use to run the sound with the following code: javax.microedition. Media.player player = (Javax.microedition

php - multilevel menu with multilevel array -

Just ask someone to solve this problem? I want to create a multilevel menu I can not find the right solution generated with multilevel array, it always gets an array_push error My study came from the original idea But still my Can not match the need. This is my MySQL [code] ----- --------------------- --------------- | ID | PARENT_ID | Name | Link | Seq | 1 | 0 | Dashboad | Dashboard / | 1 | 2 | 0 | Menu 1 | Menu 1 / | 2 | 3 | 0 | Menu 2 | Menu 2 / | 3 | 4 | 0 | Menu 3 | Menu 3 / | 4 | 5 | 2 | Joint Add / | 1 | 6 | 3 | Joint Add / | 1 | 7 | 2 | Edit | Edit / | 2 | 8 | 4 | Joint Add / | 1 ------------------------------------------ [/ Code] I want to do something like this in my array array ('dashboard' = & gt; array ('id' = & gt; '' 'Dame' = & gt; 'Dashboard', 'Title' = & gt; 'Dashboard', 'MatchMin' = & gt; Base_URL (). 'Dashboard /', 'Active' => = & Gt; NULL), &

mysql - mysqld-nt.exe exist in task list,but actually it's not running? -

Have you ever stepped into such a problem? I tried: Telnet localhost 3306 and it fails to connect. I can see mysqld-nt.exe in the task manager (I'm using the windows platform). So I restarted the server, and it's okay. Does this happen every day, any thoughts? Edit : 16 [note] D: \ MySQL \ MySQL server 5.0 \ bin \ mysqld-nt: normal shutdown 100122 10:11:16 InnoDB: start shutting down ... 100122 10: 11:18 InnoDB: shutdown complete; Log Sequence Number 0 22939338 100122 10:11:18 [Note] D: \ MySQL \ MySQL Server 5.0 \ bin \ mysqld-nt: Shut down complete 100122 10:12:40 Inodb: Start; Log sequence number 0 22939338 100122 10:12:42 [Note] D: \ MySQL \ MySQL Server 5.0 \ bin \ mysqld-nt: ready for connection. Version: '5.0.24-Community-NT' Socket: '' Port: 3306 MySQL Community Edition (GPL) 100123 16:20:44 [Note] D: \ MySQL \ MySQL Server 5.0 \ bin \ mysqld-nt: General Closure 100123 16:20:44 INODB: Starting to stop ... 100123 16:20:46 IN

Actionscript 3 setting multiple variables of an object in an array possible? -

Right now, I have a lot of movie clips in my array in my array of movie clips I want to update all the alpha values Right now, I am using the loop but this is not the fastest way to do this. Is there any way to determine the value of all items in my array? / P> Thanks! No action script does not create any that you want to code Helps to change the properties of all elements of the array with one line. There is a method, but I think it will be slower than for a simple (i = 0; i & lt; len; i ++) loop because the function for each item is called a Overhead is array.

assembly - ASM .com won't run -

I have found this sample about basic ASM, when I compile it, everything is fine !!! Great, but when I run it I get this message: This version of hi.com is not compatible with the version of Windows that you are running It happens on Windows 7 x 64 (which I was told to run OK) with this code org 100h mov dx, msg mov ah, 9 int 21h mov ah , 4Ch int 21h msg db 'hello, world! ', 0h, 0h,' $ ' I thought that you' Try to get 16-bit programs for everyone to run in 64-bit window

c89 - Mysql connection in Ansi c -

I am working in Anji C, the Windows platform. I want to add mysql database to my c program. Please guide me how I can make it possible. A work example that sets up a connection and does a query.

ssms - Strange behaviour when renaming a column in SQL Server 2008 -

I need to write some code to change the column name in SQL Server 2008. A duplicate renaming: NAME1 ==> TEMPNAME ==> NAME2 Apply a BEGIN transfer sp_rename N'dbo.Table_1.columFirstName ', N'Tmp_columSecondName_2', 'Columns' GO Exclute sp_rename N'dbo.Table_1.Tmp_columSecondName_2 ', N'columSecondName', 'COLUMN' Go Object Table dbo.Table_1 SET (LOCK_ESCALATION = TABLE) Go COMMIT But When I walk once, it just works fine. Why is the name of the column first given a temporary name? Thanks You can swap column names between two columns. Management studios re-name all the columns with the names of temporary names, and then change them to the names of the last names. BloggerBird: Right-click menu in the design window, generates a script option

c - Update position of a point -

My problem is: I have a set of digits in the 3D space, and their The situation is updated from time to time with a certain velocity but I need to keep a minimum distance between them. Can you help me with this? EDIT: I am using C for the implementation of algorithms. Thanks in advance. / div> You can also use a physics simulation. There are more possibilities than this, but at higher computational cost. For example, others suggest the collision detection, but in your comments on Daphimo, you suggest that you can choose a smooth recession to avoid collision. In this case, you can push an inter-particle force away from each other, and then use your one = F / m to move your You can calculate velocity, and v = v0 + dt one , where F contains all the particles Is the sum of strength. For example, for an intra-particle force, you can use something that looks like one of these: Computed from the Python Code below. But in fact nothing can work until it is enough

asp.net - Time Picker Error -

I used the time picker described on this link but I found a parser error while debugging . Error message is: Parser error message: unknown server tag 'cc1: time selector'. How to avoid this? Please help me. Make sure you register control at the top of your page: & lt;% @ TagPrefix = "cc1" tagname = "time selector" assembly = "timekicker" namespace = "mkb timepixer"%>

How can I insert array data into MySQL in Perl? -

I parse a text file with the script below. How to insert array data in the MySQL table? I have already learned the Perl MySQL DBI Connect method. And I can successfully connect to local MySQL db. I can create a table with the MySQL command line #! C: \ Perl \ bin \ perl.exe strict; Use warnings; While (& lt; data & gt;) {my @rocks = split (/ \ s + /, $ _); Fork Mary Rock (@ Rocks) {$ rock = "\ t $ rock"; Put a tab in front of each element of # $ rocks. = "\ N"; # Put a new line at the end of every print $ rock; }} __DATA__ ABCDEFGH I want to browse the table result I Item1 Item2 Itme3 Item4 A CDEFGH Use strict; Use warnings; Use DBI; My $ dbh = dbi- & gt; Connect ('dbi: mysql: database = test; host = localhost', 'root', 'yOUR_PASSWORD', {raiseError => 1, AutoCommit => 1},); My $ sql = 'Foo (item 1, item 2, item 3, item 4) value (?,?,?,?)'; My $ sth = $ dbh- & gt; Ready ($ sql); While (&

file io - How do I load the contents of an rss feed rendered by php? -

WordPress is providing an RSS feed, but of course there is not really a file. I am writing a script to read and present RSS, but fails to load as an XML file, because there is not actually a file I write: $ Rss = simplexml_load_file ('/ news / feed / rss /'); And I get this error: Warning: simplexml_load_file () [function.simplexml-load-file]: I / O Alert: loading I still get this error by using file_get_contents: Warning: file_get_contents (/ news / feed / rss) /) [Function.file-get-content] : Failed to open the stream: any such file or directory redirecting URL Because the file is not, but you have to file it as X Are trying to c. Assume that you have the correct phopan wrapper (and everyone does), try opening the simple XML to the URL: $ rss = simplexml_load_file ('http://myurl.com/news / Feed / rss / ');

javascript - disable text highlighting on double click in jQuery -

इस सवाल का पहले से ही एक उत्तर है: < / P> 8 जवाब मेरे पास यह jQuery टॉगल है यह ठीक काम करता है। & lt; ul & gt; & Lt; li & gt; स्टोर पर जाएं & lt; / li & gt; & Lt; li & gt; रात का खाना उठाएं & lt; / li & gt; & Lt; li & gt; डीबग क्रैश & lt; / li & gt; & Lt; li & gt; एक जोग लें & lt; / li & gt; & Lt; / ul & gt; & nbsp; $ ("li")। टॉगल (फ़ंक्शन () {$ (this)। Css ({"list-style-type ":" डिस्क "," रंग ":" नीला "});}, फ़ंक्शन () {$ (यह)। सीएसएस ({" सूची-शैली-प्रकार ":" डिस्क "," रंग ":" लाल "} );}, फ़ंक्शन () {$ (यह)। सीएसएस ({"सूची-शैली-प्रकार": "", "रंग": ""});}); समस्या यह है कि जब मैं तेजी से क्लिक करता हूं, उसमें पाठ को हाइलाइट किया गया था। क्या टेक्स्ट को हाइलाइट होने से रोकने के लिए कोई तरीका है? मैं iPhone पर लिख रहा हूं, जबकि दूर डेस्क से,

Selenium: How do you delete a character from a textbox -

I am trying to simulate a user removing a character from the text box. This text box sets many JS incidents, I have a lot of trouble typing (or type-ing) in ITT due to this. My latest attempt was: sel.key_press (locator, 127) < What is the safest way Use funnel with '\ 008'

utf 8 - Importing bulk CSV data in UTF-8 into MySQL -

I am trying to import approximately 10K rows of UTF-8 encoded data into a new MySQL table. I can do so successfully with the load data INFILE via the MSQL workspace but the UTF-8 characters are inverted. I have tested the database otherwise via PHP And this store fixes UTF-8 charaters. The problem seems to be with load data INFILE , and I've come to some sources about it. Does anyone know an alternative solution, or perhaps another easy way to import CSV data? Thank you. Resolved: Those who see it and who have the same problem, just add characters LOAD DATA INFILE Set as the parameter while running, I have easily realized :) According to , you < Code> CHARACTER SET input parameters to provide the character set parameter in your description. Have you tried making the 'utf8' as an input code set?

SQL figuring out days remaining based on days interval (using SQL Server 2005)? -

I have a table that represents the user's membership on our system. I have two tables representing membership for one account and the other shows the type of membership. The subscription table relates to the membership type table related to the subscription type field in the subscription type table. I need to understand the remaining days of that account. This is my example: Users were signed up on January 1, 2010 and their tenure is 30 days. Based on today's date (January 25, 2010), they will have 6 days left. I need help in designing SQL so far in my stored methodology: @Assignment IDId ady @term int declared rest int set @term = (SELECT subscriptionTerm FROM dbo. Subscription type where dbo.SubscriptionTypes.SubscriptionTypesID = @ SubscriptionTypesID) Now I have to find out what to do with the remaining questions, or if I somehow I can do a SQL statement, so I can get a different position Vshykta not. / P> Update: Here's what I've got with your h

How to additionally filter list of published nodes in Drupal 6 -

The way I need to determine the content published or has not been published . The specific content editor (this is a separate non-administrative role) should have the possibility to set the published flag for a specific node (it can be obtained directly through the module or its techniques Can be added) that can be added using two additional publishing features , i.e. publication start date and publication end date (field) ) To set up Should be. These alternate fields should be used to determine the position of the published of the node, assuming that if specified, they will override the published flag. Actually, I would like to add my bits of the SQL code to the appropriate query section or postprocess. Such queries may result in overwrite some functions or provide some callback. The solutions are completely acceptable depending on the custom module writing. I am using Drupal 6 . It looks like any one or module what you should do.

Querying MySQL with PHP -

What's wrong with this code: $ q = query User where email = '$ _POST [' email ']' and name = '$ _POST [' name ']' "); Parsing error: Parsing error, T_STRING 'or T_VARIABLE' or `T_NUM_STRING 'C: \ wamp \ www \ conn \ index.php on Line 16 Thanks in advance. $ q = query (select "* from users where email = '{$ _POST [ 'Email']} 'and name =' {$ _POST ['name'] '} "); You have missed two quotes besides: 1) Always avoid user input (for): $ email = mysql_real_escape_string ($ _ POST ['email']); $ Name = mysql_real_escape_string ($ _ POST ['name']); $ Q = Query ("Choose from user where * email = '{$ email}' and name = '{$ name}' '); 2) An editor highlighting code Find, so that you do not get similar problems in the future. I recommend.

python - django: gettext and coercing to unicode -

मेरे डीजेंगो एप्लिकेशन में मेरे पास कोड है। वर्ग स्थिति (ऑब्जेक्ट): def __इनट __ (स्वयं, आईडी, वर्ण): self.id = id self.desc = def def __unicode __ (स्वयं): वापसी self.desc स्थिति = स्थिति (0, _ (u "कुछ पाठ")) जब मैं किसी स्थिति को प्रदर्शित करने की कोशिश करता हूं (या इसे यूनिकोड पर भी दबाव डालने के लिए), तो मुझे मिल जाता है: प्रकार त्रुटि: यूनिकोड को असर: स्ट्रिंग या बफर की आवश्यकता होती है, __proxy__ पाया जाता है क्या कोई मुझे समझा सकता है, कि मैं क्या कर रहा हूं? कोड> _ () फ़ंक्शन Django से एक django.utils.functional .__ प्रॉक्सी __ ऑब्जेक्ट वापस लौटा सकता है, जो स्वयं यूनिकोड नहीं है (देखें)। अजगर को यूनिकोड () कॉल नहीं करता है, इसलिए यह आपकी स्थिति ऑब्जेक्ट के लिए __ प्रॉक्सी __ ऑब्जेक्ट को सीधे वापस करने के लिए एक त्रुटि है। आपको __ यूनिकोड __ विधि रिटर्न यूनिकोड (स्वडेटेसी) बनाने की आवश्यकता है। ध्यान दें कि यह डीजेंगो के लिए विशिष्ट है; पायथन का अपना gettext इन प्रॉक्सी वस्तुओं को वापस नहीं करता।

ASP.NET Master page Page_Load Override -

I have a master page for my site that used to styling the rest of the site and for user authentication goes. It works fine except that I have a page that I want to retain the style from the master but does not authenticate because this is the page that tells the user that they are not authenticated. How can I override the page_load method of the master page from this one page? Any other ideas on how authentication can be done on a single page without authorization from the master? In the request for the current page name (whatever. Check somewhere. Leave certification for this.