Posts

Showing posts from January, 2014

hibernate: foreign key is primary key -

I have 2 tables related to each other: ** message ** (id, name, content) ** schedule_reference ** (message_id, start_time, stop_time) I use message_id for the primary scheduled_message table. My domain class: public class messages {private integer ID; The name of the private string; Private string content; ...} public class scheduled messages {private message messages; Private date start time; Private date stoptime; } I try to type Hibernate XML config for mapping 2 sections, but still error in message_id: ( & lt; Class name = "Message" table = "message"> gt; & lt; / id & Property name = "name" column = "name" / "property name =" content "column =" content "/> gt; & lt; / class & gt; class name =" scheduled message " Table = "Scheduled Meas" & gt; & lt; id name = "message" column = "message_id" & gt; provider name = &qu

c# - Testing properties with reflection using attributes -

I am trying to create a nUnit test to do the following: 1) DLL load To check out. 2) Explosions between different types. 3) Find people who have a specific custom feature. 4) Instant these types and ensure that all their public properties are not empty. Even what I have written: assembly assembly = assembly Loadfile ("MyLib.dll"); Leading type (type type in assembly). Gatetype (if) (if type.GetCustomAttributes (typeof (CustomAttribute), wrong) .Lang! = 0) {Object example = Activator.CreateInstance (type); Foreach (PropertyInfo propertyInfo type.GetProperties ()) {// How to go from here? }}} As you can see that I do not know how to complete the test for the tap, suppose the rest of the code is correct. Getting value works like this: Object value = propertyInfo.GetValue (example, blank); If (value == faucet) // tap value and if (DBNull.Value.Equals (value)) // DB tap

gnome terminal - how to overwrite default system key mapping in vim -

I want to map F1 to create a new tab so that I add the following line Map & lt; F1 & gt; : Tauban & lt; CR & gt; In my .vimrc and save it. But when I hit F1 in Vi, the GNOME Terminal Manual window was fashioned instead of creating a new tab. So what should I do in this situation? Go to edit. Keyboard shortcuts ... more shortcuts or remove them.

xcode - linking a framework to project -

For example to add a framework in the workspace steps included: 1. Click OK on the framework 2. Select the framework And click "Post-Text" itemprop = "text"> Not the preferred Apple way to do this? Are you doing it in a different way for any specific reason?

How to test if a directory already exist in PHP? -

How can I test if a directory already exists and if none in PHP is created? Try this: $ filename = "/ tmp"; If (! File_exists ($ filename)) echo $ filename, "does not exist"; Elseif (! Is_dir ($ filename)) echo $ filename, "no directory"; Else "Directory" echo, $ filename, "already exists"; Check if path / file exists and is_dir checks whether the given file name directory is or not. Edit: To create a directory later, call mkdir ($ filename);

jquery - How do i call the same function with different element id tags? -

I am a lot new for jquery and there is a problem calling more than one instance of the function. I have a function $ ('# open_dialog'). Click (function () {$ ("# dialog"). Dialog ("open"); return false;}); To call this function I have a href link with the name tag name of open_dialog, of course it works very well if it is the only link on the page which refers to the function Does (one relation to one) However, I want that (a lot of relationships). I have a table of 25 records and each of my records is required for a link which will call the open_dialog function I know that not all IDs can be called Open_dialog because they have to be unique So, how do I use the function when crossing that value, from which one of my 25 records is giving immediate function. The way my records are dynamic, $ ('#open_dialog, open_dialog2, open_dialog3, ...') is not practical. Thanks for watching my post Instead of using unique ID If you can use a

asp.net - Can s#arp-architecture/mySQL run under medium trust? Alternatives? -

I am trying to get a shared prototype that is ASP.NET S # ARP-architecture (Sharp architecture) Uses the hosting site This site operates in the middle trust, which reveals problems with this profile. First of all I went on pursuing a wild goose pursuit with mySQL.data.dll, but the latest version already supports partial trusted callers. By now I found that the only way, which mainly describes the gathering of all things from the ground up, starts with various cast components. Is this the only way to do this work, and more importantly, does it actually work? I have some good experience with S # Arch-Architecture, and there are only a few days to build this prototype, I thought S #Arap-Architecture would be a good match. . Therefore, my options have to be with SA, or to roll the MVC / NH / MSSLL application on the other side of the spectrum. Other suggestions (using NHibernate and ASP.NET MVC) are also welcome. two times the answer: again - everything does work this To w

c# - Get Oracle Database name -

How can I get the program named Oracle Database I'm connecting to? I tried: using (Oracle Connection Connection = New Oracle Connection (oraConnectStr)) {connection.Open (); Return connection Database; } but it returns an empty string. I can not use full connection string because it can contain username / password. you V $ database : SQL & gt; Choose a name from the V $ database; NAME --------- PROD

objective c - How do I add a UIImage to grouped UITableViewCell so it rounds the corners? -

I am trying to add images in the table cells in the grouped UITableView, but the corners of the images have not been cut. For example, the first image in the table will only need to the top left corner. This was my solution, which could use a few refactoring: <0> Zero AddRoundedRectToPath (CGContextRef Reference, CGRect Rect, Float Oval Width, Float OvalHit, BOOL Head, BOOL Down) {Float FW, FH; If (ovalwith == 0 = ovalhit == 0) {CGContextAddRect (reference, rect); Return; } CGContextSaveGState (reference); CGContextTranslateCTM (Reference, CGRectGetMinX (rect), CGRectGetMinY (rect)); CGContextScaleCTM (references, oval, oval high); FW = CGRect Gate Width (Rect) / Oval Wideth; FH = CGRactiteHight (Rect) / OvalHit; CGContextMoveToPoint (Reference, FW, FH / 2); CGContextAddArcToPoint (Reference, FW, FH, FW / 2, FH, 0); NSLog (@ "down?% D", below); If (above) {CGContextAddArcToPoint (Reference, 0, FH, 0, FH / 2, 3); } And {CGContextAddArcToPoint (reference, 0,

django - Python url template tags giving only part of a absolute url.. ..Must be a lack of sleep -

I should be suffering from severe sleep deficiency, but I have been stumped. I can not understand how to get the {% url%} instruction to give the correct URL. So we start with the basics .. import urls.py .shortcuts import from render_to_response import, import_list_or_404 import from django.template import requestontext to people.models import worker, OfficeLocation def employee_detail (request, id, template_name = none): "" "This will give you a complete detailed information based on the user's name . "" Person = employee. Gadgets (id = id) Returns Render_translation (template_name, _getDetail (person), context_instance = RequestContext (request)) Finally here my people / singles.html < Code> is a sample snippet. People / Single.html & Lt; / Tr & gt; Now I can see that I am moving the right data back, for example, it is in a link that is in the code & lt ; Td width = "300px" & gt; Supervisor: &a

c# - Header printing on every page -

I have a gridview that I want to print its header on every page and I have a page header I want to print. The problem is that one or the other works for me. I can not get both to work at the same time. I have a sample code to show what I did below. & lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Body onload = "thead ('tblheader');" & Gt; & Lt; Table id = "tblheader" & gt; & Lt; Tr id = "title" & gt; & Lt; Td> Page header & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / Body & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Body onload = "AddTHEAD ('Claim Grid');" & Gt; & Lt; Gridview id = "claimGrid" & gt; & Lt; / GridView & gt; & Lt; / Body & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;

actionscript 3 - Package external files into flash deliverable? -

Is it possible to package all external files, such as images and videos, in the last SSF or equivalent file? I want to keep external files separate because it is easy to change them during development, but I do not want them to be external when delivering the project. Does anyone know if this is possible? If you mean that you want to develop your flaw and all the assets for your SDF If you want to load externally, then it is time to give SPF for you, all assets are loaded to the customer and are saved in SWF so that it is 1 file, not again. First, the way to load images, videos, etc. requires a different code from an external source, then it happens when all the assets are compiled themselves in SWF Secondly, to do this There is also no mechanism. As an alternative, you can keep all your assets in a separate SWF which will deliver 2 SFFs after your main SDF load, updating the material during development with the same property However, if you keep all the assets in the main

ibm midrange - Error while Invoking AS400 RPG From Java -

In relation to my tomorrow, using the java program, the following is an exception from the RPG program. **** Application Error RNX 9 002 JM 30000 RR has been revoked on the statement * N, instructions X'0000 ** '. ** I used the code that was posted in that post and was changed according to the suggestions given in the reply. Any idea what might be the cause of this error? Log on for ISeries, and study program dump. The dump should show the reason that the program stopped with this error. If you can not log on, you will not solve this problem. More info or in.

How to have a single "HelperClass.IsLoggedIn()" method for the entire ASP.NET web project? -

This is a general requirement on every page: if (session ["login" Done "" == faucet || (Bull) session ["login in"] = true)) .... user is not logged in. Return I think There was a way, I can make a class "helper" with a method signature bool IsLoggedIn () and it can automatically check that method by calling a page. Whether it was called from the page in which session ["Logged in"] is set to true something like this: class helper {public child islamgden () {System.Web .UI.Page page = *** FindCallerPageSomeHow *** (); if (page session ["logged in"] == faucet || ((Bull) page session ["login in"]! = True ) Return return; return (bool) page. Hpptt session ["login in"] == true);}} Of course, I have an interface for each codebehind class I can try to implement it, but it is repetitive. Besides, I could go through HttpContext for IsLoggedIn , but it is a bit disorganized .. Any ideas? Is

regex - Matching '_' and '-' in java regexes -

मेरे पास यह java में regex था जो कि एक अल्फ़ान्यूमेरिक वर्ण या टिल्ड (~) < / P> ^ ([a-z0- 9]) + | ~ $ अब मुझे अक्षर भी जोड़ना है - और _ मैंने कुछ संयोजनों की कोशिश की है, न तो काम का, उदाहरण के लिए: ^ ([a-zA-Z0-9 _-]) + | ~ $ ^ ([a-zA-Z0- 9] | - | _) + | ~ $ नमूना इनपुट स्ट्रिंग जो मैच चाहिए: woZOQNVddd 00000 ncnW0mL14 - dEowBO_Eu7 7MyG4XqFz - A8ft-y6hDu ~ कोई भी सुराग / सुझाव? - है वर्ग कोष्ठक के भीतर एक विशेष चरित्र यह एक सीमा इंगित करता है यदि यह regex के किसी भी अंत में नहीं है, तो इसके पहले एक \ डालकर बचने की आवश्यकता है। यह एक शॉर्टकट को इंगित करने योग्य है: \ w [0-9a-zA-Z _] के बराबर है, इसलिए मुझे लगता है कि यह और अधिक पठनीय है: ^ ([\ w -] + | ~ $ < / कोड>

problem with update strong typed dataset turn to database in C# .net framework 3.5 -

I want to remove special characters in a table of the database I used the went table type strong it When I got all the data in the dataset from the database and it was modified, I called the data adapter to convert the database to the database, but it does not work. Below is my code DSTL Tele = New DST (); Dititeltebladaptrsktelefon_biketebladaptr adapter = new Dititeltebladaptrsktelefon_biketebladaptr (); Adapter.Connection = New SqlConnection (Configuration Manager. AppSettings ["SiteSqlServer"]. ToString ()); Adapter.fill (tel.telephone_bk); Foreign exchange (telephone Telifon_bike. Cry Distielktelefon_bikearo row) {row.telephoneNo = Nikalendaitspes (line. Telifonnau Ktostring ()); Row.AcceptChanges (); } Tail. accept (); Adapter.Update (tel.telephone_bk); Please give me some ideas? Thanks in advance. I have found solution to this problem using TableAdapterManager. Below is my code: DSTtel Tele = New DST (); Dititeltebladaptrsktelefon_biketeblada

validation - JavaScript to find TinyMCE rich text editor value is null or not -

I use TinyMCE textarea in one of my web applications. How to check document.getElementById ("myeditorid"). Value did not help me. This is not a textarea, so the value property will not work. How is this a reference to the editor and get the text from it: var text = tinyMCE.get ('myeditorid'). GetContent ();

WPF Style Inheritance -

I have this XAML if I delete the stackpanel. The Resource Sections I receive those styles which were defined at the application level. If I leave it, then I just get a new style. How do I mix it in both local and global styles? & lt; Window x: class = "main window" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml" Title = "main window" height = "350" width = "525" & gt; & Lt; DockPanel & gt; & Lt; Stackpaneel dockpanel.doc = "top" orientation = "horizontal" & gt; & Lt; StackPanel.Resources & gt; & Lt; Style TargetType = "TextBlock" & gt; & Lt; Setter property = "margin" value = "4" /> & Lt; / Style & gt; & Lt; Style TargetType = "Button" & gt; & Lt; Setter property = "margin" value = "4" /> &

Dynamic terminal printing with python -

Some applications, such as Helenzb, have a way of printing with the presence of dynamic refractioning data on the terminal, such as the top (). Is this the best way to do this in Python? I have read on logging and cursing, but do not know what to use. I am creating a replenishment at the top if you have any other suggestions, then I am also open to them. The easiest way is, if you only need to update one line (for example, to make a progress bar), '\ r' (carryback) and Sys.stdout: : Import system for import time is to use in category (10): sys.stdout.write ("\ r {0}>" format (" = "* I) sys.stdout.flush () time.sleep (0.5) If you need the appropriate console UI which supports the pointer to move forward, then use the module from the standard library: import time import curl dig pbar (Window): In I range (10): Window.Edistrict (10, 10, "[" + ("=" * i + +) "" + "(* * * (10 - i))" + "] ") W

devexpress - Is ASP.NET MVC a good platform? -

Try to use the DevExpress Web Server Control (which is awesome) in the Aspen MVC project (some articles I have read) 'The net indicates that both can work well together.) I am eager to use a new project ASP.NET MVC, and I I am just reading a lot on ASP.NET MVC, but I'm not sure that I have a project in it Should invest. My concern is that it may be in the situation of LINQ to SQL, which is essentially closed because MS will not provide updates. Is ASP.NET MVC a viable solution to invest in my case? Yes, of course, ASP.NET MVC or any other MVC framework is lucrative. Pattern is about separating all worries and helps you keep your code clean. If you like DivXpress control too much you may be disappointed because ASP.NET MVC does not have any server-side control. But if you want to learn the underlying mechanism of web, HTML, JavaScript, clean code, TDD ASP.NET MVC, then there is a good way.

c++ - Why does endl get used as a synonym for "\n" even though it incurs significant performance penalties? -

यह प्रोग्राम: #include & lt; iostream & gt; # शामिल करें & lt; cstdlib & gt; #include & lt; स्ट्रिंग & gt; Int main (int argc, const char * argv []) {का प्रयोग :: std :: cerr; का प्रयोग :: std :: cout; :: std :: endl का उपयोग कर; अगर (argc & lt; 2 || argc & gt; 3) {cerr & lt; & lt; "उपयोग:" & lt; & lt; Argv [0] & lt; & lt; "[& Lt; गिनती & gt;] & lt; संदेश & gt; \ n"; वापसी 1; अहस्ताक्षरित लंबी गणना = 10000; If (argc & gt; 2) {char * endptr = 0; Count = :: std :: strtoul (argv [1], और endptr, 10); अगर ((आरजीआर [1] [0] == '\ 0') || (* अंतःप्रेटर! = '\ 0')) {cerr & lt; & lt; "उपयोग:" & lt; & lt; Argv [0] & lt; & lt; "[& Lt; गिनती & gt;] & lt; संदेश & gt; \ n"; वापसी 1; }} Const :: std :: string msg ((argc & lt; 3)? Argv [1]: argv [2]); (अहस्ताक्षरित लंबे मी = 0; i & lt; गिनती; ++ i) {cout & lt; &

php - how do i handle concurrent inserts in mysql table and fetch the correct insert id -

I'm using Adobe to the PHP library. Use this function to bring the ID on which the record is inserted "$ db-> Insert_ID ()" I know If there are multiple and simultaneous inserts in the database table, then what method will this file be inserted to me to enter the ID? The reason for this is that I use this last entry ID for the further processing of other records and I am making subsequent entries in the related table. Is this approach quite safe or is I missing something? Please help me in preparing a suitable work plan for this so that I can use the previous insert ID to be included in another table. Yes, it is safe for concurent use because it is because LAST_INSERT_ID () per-connection, as explained: The ID that is generated is retained in the server on a per-connection basis. This means that the value given to the client given by the function is the first customer, which is the first AUTO_INCREMENT value generated for the most recent state

Oracle sql result to DBF file export -

I would like to export the data from the oracle table to * .dbf file (such as excel) via PL / SQL scripts. Is there any code available? There are several ways to do this. The easiest way to use such as SDL developer or TOAD is the easiest way, which offers this functionality. If you want to call it by PL / SQL, then there are no built-in Oracle functions in it. However, it is relatively easy to build something using UTL_FILE, which can write different records than price. It can be picked up in Excel Note that the default separator - , (comma is "C" in CSV) - Creates problems with comma in your exported data Will do So you will need to open a right-click with it instead of using the Data Import Wizard ... Incidentally, it may be used to use the .dbf suffix For a bad idea. The approximate meaning of the Oracle file system is a database file - that is, the share of the database infrastructure. It's just a conference, but there is no point in misinterpreting

java - Modifying POM settings from plugin code -

I have just started writing Maven plugins and wondering what Pom.xml Changing an artifacts version number for the file example. Line is being modified with the exception, I want to preserve the remaining formatting in the XML file. I'm going to start doing this manually through Java Daum libraries, but if there is a Maven feature on it / square, there is a need to check first. Thank you. My advice will be how it is done, in fact, in interesting parts. Find and dig the source :)

java - How to draw a route between two geopoints on the Android -

I have a map view of two overlay etams. How can I make a path between two geographic points? This application is contained in the source code ... it will solve other problems.

sql - Ruby on Rails: joining two tables on something other than the standard foreign key -

मेरे पास एक रेल क्वेरी है जैसे: @user = User.find_by_username (params [ : खोज],: शामिल = & gt; [: user_similars]) मॉडल: उपयोगकर्ता (has_many: user_similars), user_similar (is_to: उपयोगकर्ता) उपयोगकर्ता_सिमिलर mysql तालिका में एक "user_id" फ़ील्ड एक विदेशी कुंजी के रूप में है, लेकिन मुझे नहीं चाहिए: इस उदाहरण के लिए इसमें शामिल होने के लिए शामिल करें मैं "user_id_similar" नामक एक अन्य क्षेत्र में शामिल होना चाहता हूं क्या कोई तरीका बदलना है: इसमें शामिल होना चाहिए ताकि वह किसी अन्य क्षेत्र में शामिल हो सके? क्या मुझे होना चाहिए का उपयोग कर: एक अलग विकल्प के साथ जुड़ें? या शायद मॉडल पद्धति घोषणाएं संपादित करें? धन्यवाद! जब आप दो तालिकाओं के बीच के संबंध को परिभाषित करते हैं, तो आप निर्दिष्ट करें कि किस कॉलम को विदेशी कुंजी के रूप में उपयोग करना है इस मामले में, "user_id_similar" को एफके बनने के लिए सेट करें, और इसमें तब शामिल होना चाहिए जब सम्मिलित हों

c++ - How do game events work? -

I'v always wondered how it works. Is the game slowing down? For example, if a car is flipped, how would it show it? This can be seen in this form: if (player.car.angle.y == 180 ) {Something} Whatever is my puzzle I, when will it play games? The way I see it, whatever can be done in the game, it appears that if I'm just wondering how it is handled. Also, since the game runs through a loop, what if the car is flipped over 1 frame, whether the boolean will actually be used to check whether the event In most general terms, any object in the engine is a state - if it changes the state ( Like not flip to flipped ), it is a transition. With an infection you can not fire an event or not, but as the infection happens only when the changing situation will not be removed once again. For situations that trigger the infection, they have to be coded from somewhere. Sometimes these are more clearly coded, but most of them are given the parameter so that the script or

c# - Threading UI Update (not the invoke required question) -

I have a case where I get so many sockets coming requests. I would like to update the UI after 3 seconds The last socket request has arrived. If the socket arrives in the request and the last one was only 2 seconds earlier, then it should clean the UI update and start waiting for 3 seconds. Note: Each socket request arrives at a different thread. You can update the UI in three seconds with the interval (timer's property to your Set in the form) and whenever you receive a request, reset it. Edit : On the further thinking, you should use one, which is less convenient then the timer. Timer is but more lightweight, and fully thread-protected. In your callback, you have to call form.BginInvoke to switch to the UI thread. Every time you receive a request, you can timer.Change (3000, -1) .

math - Multinomial Generation of Degree n -

I am basically looking for a conference function which will calculate multi-dimensional numbers by one degree and digits. Example 2 variables; 2 degrees: x ^ 2 + y ^ 2 + x * y + x + y + 1 thanks. see Knuth the art of computer programming , Volume 4, one in Fiscal 3 For the wider answers. Brief answer: It is enough that in all multilateral expressions with degrees n with the variable exactly d. Then, for your problem, you can either add the answer with the degree, or add a dummy variable "1". The problem of making all the expressions with the degree is D, so that's just one of the generating commands all ordered split (i.e., x 1 + ... + All non-integer integer solutions for x n = d), and this can be done with a simple back tracking algorithm. ("Depth-First Search")

osx - Bash output as Applescript list problems -

It's just driving me crazy. I'm trying to read a file in Bash, delete duplicate, sort , And then display the "List Options" window by CelestScript. My $ DATALOG file is formatted like this: field1 field2 area 1 field 3 field1 field4 etc ... AppsScript = awk '{print $ 2}' $ DATALOG | Awk '! X [$ 0] ++ '| Sort-u | Tr "_" "" | Sed 's / ^ / \ "/' | sed 's / $ / \" /' | Tr "\ n" "," | Sed 's /.$//'/code> Now, this line works great. In the $ applet, I get an output like this: "Field 2", "Field 3", "Field 4" I need to Now, I take that output, and add a backslash before quotes, and seplescript parts. Applescript = 'Repeat' application to return "system events" (choose from the list {$ Applescript}) "| Sed 's / \" / \\\ "/ g ' And this gives me what I need: Tell the application \

Problem compiling C++ class -

I'm running a C ++ program that is another Uses a square from CPP file. There is only one constructor in the classroom. This works when I check it separately, it compiles the main program, but when I run it, I have a bug in the constructor. Can anyone think of any situation? Thank you. I think I just run the code in the terminal, and it's okay. But when I try to create a project in Eclipse, it shows that the following code has many definition errors: class model {public: int texture []; Float corner [] [3]; Float triangle [] [13]; Public: Model (const char *); // constructor}; Model :: model (const char * filename) { The error message is: Many definitions of `model :: model (char const *) ' Any ideas? H (header) and a CPP (implementation) file should be split into and put: model :: model (const char * filename) { the latter To rewrite your class in or to, so that the constructor's definition (and any other member works) is inside the class in th

web services - How to set up website periodic tasks? -

I'm not sure the topic is appropiate for the question ... anyway, suppose I have created a website PHP I do not have a more accurate server with cheap hosting with JSP or limited functionality and I can not run daemon or services on my own. Now I want to do periodic work (say every minute or two) to do some data. They are likely to be time consuming, so I can not repeat the count for each user to reach a page. When a user loads a page and I think that enough time has passed, I can count once, but in this situation, if the calculation becomes very high then the timing of response can be excessive and time (It is unlikely that I do not mean walking so long, but I am considering the worst case scenario). So considering these costs, what solutions would you suggest? If you choose to use the crontab, you have to know a bit more to execute PHP Script from them if your PHP is implemented as CGI or depends on the effect of an Apache module. There is a good article on how to do t

php - What's the term for calling a function this way? -

$ arr [$ key] को सेट किए बिना; यह नहीं होना चाहिए: अनसेट ($ query [$ key]); से: गूंज वास्तव में एक फ़ंक्शन नहीं है (यह भाषा निर्माण है) उसी के साथ unset ।

c - What kind of data type is "long long"? -

I do not know this type of what is the biggest of all? I think this is an integer type, right? Or is this a temporary thing? Bigger than double? Its an integer, at least as large .

iphone - uiview getter nil -

I am trying to get some views from my view controller from my view (a subview) The size will come when the user inputs when I work hard on those variables in the SVVV, the shape is perfect, but when I use the gates to use the custom variable from the view controller, they return zero and drawing It's messy. I do not get any errors or warnings. I know there is a problem with Getter, any suggestions? Is anyone an example of passing the variable to do a subview, so can the use of sygonnectext be used? I've been trapped for a long time. I think my problem at this point is so simple, I'm missing something fundamental, I thought I packed the setters / gates. Make sure that whatever you want (ie, parents, or view or whatever You are reaching recipients) is not zero, try setting a break point just before entering them and validating that your goal is valid, and valid data.

Apache RewriteCond from result of php request -

I would like to add a rewrite status to my htaccess that is a "php" file incorrectly or otherwise. I'm using U switch in my RewriteCond to run a subrequest and if the condition is not satisfied, PHP script returns a 404 error, which runs RewriteCond. My goal is to run a URL Small service in parallel with a PHP website. Here is my current .htaccess RewriteCond% {RewriteEngine on current REQUEST_FILENAME}! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteCond / smallurl /% {REQUEST_URI}! You RewriteRule (. *) Index.php / $ 1 (. *) [L] RewriteCond% {REQUEST_FILENAME}! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteRule smallurl / $ 1 [L] What is the best practice to achieve something like this? Compliance, Things I Should Know? "post-text" itemprop = "text" thanks > You can create a RewriteMap REQUEST_URI - I think it will work with RewriteCond , though you think that It works better as standard RewriteRule Basically, your P

C# dataset insert query issue from access database -

I am using Visual Studio 2008 and Access 2007 database when I try to create a new insert query in my dataset I'm storing, then the stored procedure mixes database field values. I have a print screen of the problem here: As you can see in the attached print screen, the table is displayed in the client and InsertClient is below the stored procedure. My problem is that the parameters are all mixed. Is there a solution to this problem or is it just a visual studio bug? Thank you. This is probably just a display order issue If you enter the field name Alphabetically, you want to insert parameters, but visual studio is showing the field that is defined in the database (for example), this difference will explain. P>

C++ encoding macro -

Is there a macro that tells you that encoding C ++ is using for your wchar_t type? I'm currently stuck to GNU and quarrel. I'm assuming UTF 32 because my wchar_t size is 4 bytes. Although it can be UTF-16, it also uses 4 bytes for some code-points. But still there is a problem with UCS-4 or UTF-32L or UTF-32BE. Any help / expertise on this topic? wchar_t implementation is specific. It is not specific encoding if you are on a platform where wchar_t is 16 bit , So it does not support UTF 32 for instance. Encoding (UTF8, UTF32) and storage (wchar_t) are different things.

Python equivalent of IDL's stop and .reset -

I'm relatively new to Python, but there is little experience using IDL I was wondering if anyone knows That IDL's stop and. There are equal commands in the dragon for reset command. If I am running some IDL script then I had written that I have put a stop command, essentially what it does, stop the script there and give me access to the command line in the middle of the script . So I have access to all the functions and variables that I defined before the Stop command, which I find really useful for debugging. Reset command I find very useful too. What this does is to reset the IDL environment (clears all the variables, functions, etc.). It seems that I closed that session and opened a new account, but without getting out and restarting the IDL, I feel that if I am trying to debug a script, then I have written that it Sometimes useful to start with scratch and do not have to reset IDL (or python now). Any help with these issues will be greatly appreciated. Cheers

Ruby: Parsing a complex hash -

I have a hash that deepens many levels: I through each service I am trying to loop, I am running in many neil [] errors, though hash is not zero. For example: food_hash ["food"] ["food"] ["servings"] returns no problem. [] It may be because the IM is sleeping half but I can not seem to descend under "service description" ... Can anyone help me in the right direction? I "service-statement" meditation Please note that (1) servings.serving is an array, and (2) food does not have a key in the hash, instead try it out: < Code> f ["servings"] ["service"] [0] ["service_details"] = & gt; "1 thin piece (yield after cooking)" where f is hash

pointers - allocate matrix in C -

I want to allot the matrix. This is the only option: int ** mat = (int **) Malloc (rows * size (integer *)) {mat [index] = (int *) malloc (cola * size); } Well, you did not give us a complete implementation. I believe that your it means. int ** mat = (int **) malloc (rows * size (int *)); For (int i = 0; i & lt; rows; i ++) mat [i] = (int *) maulok (column * sizaf (int)); Here is another option: int * mat = (int *) malloc (rows * cols * sizeof (int)); Then, you int offset = i * cols + j; Using the matrix. // Now Mat [offset] matches (i, j) for mail and int offset = i + rows * j; // no mat [offset] corresponds to M (i, j) . One of these two options is actually the preferred way to handle a matrix in C. This is because now the matrix will be stored in memory and you will get the benefit. In fact, the CPU cache will be very happy with you.

utf 8 - PHP and Russian Letters -

What is happening with the Russian letters on sending via PHP requests ... a mail, like? The "hardcoded" Russian characters are displayed correctly, but with the hieroglyphs from the textboxx of the document: HTML page: & lt; Tr & gt; & Lt; Td style = "width: 280px" & gt; Cold work & lt; / Td> & Lt; Td> & Lt; Input type = "text" id = "workaround" /> & Lt; / Td> & Lt; / TR & gt; PHP Page: $ Work Resource = $ _REQUEST ["Work Resource"]; // Содержание работ // ... $ WorkContentLabel = "Working On"; // ... $ message. = $ WorkContentLabel ": \ T". $ Work Content "\ N"; // ... // Email stuff (data has been changed below) $ = "test@gmail.com"; $ From = "me@domain.com"; $ From_header = "From: Russian site command"; $ Theme = "message with Russian letter"; $ Theme = '=? UTF-8? B? ' $ Subject '? = 

mysql - DB load CSV into multiple tables -

UPDATE : डेटा के प्रारूप को स्पष्ट करने के लिए एक उदाहरण जोड़ा गया। इस तरह से स्वरूपित प्रत्येक पंक्ति के साथ सीएसवी को ध्यान में रखते हुए: tbl1.col1, tbl1.col2, tbl1.col3, tbl1.col4, tbl1.col5, [tbl2.col1: tbl2.col2] + जहां [tbl2.col1: tbl2.col2] + का मतलब है कि इनमें से कोई भी जोड़ दोहराया जा सकता है ex: tbl1.col1, tbl1.col2, tbl1.col3, tbl1.col4, tbl1.col5, tbl2.col1: tbl2.col2, tbl2.col1: tbl2.col2, tbl2.col1: tbl2.col2, tbl2.col1 : Tbl2.col2, tbl2.col1: tbl2.col2, tbl2.col1: tbl2.col2, tbl2.col1: tbl2.col2, tbl2.col1: tbl2.col2 तालिकाएँ प्रत्येक पंक्ति से एक कुंजी के रूप में उपयोग करने के लिए संबंधित है जो कि ऊपर उल्लिखित किसी भी कॉलम के अतिरिक्त बनाया जाना है। mysql लोड डेटा इन्फाइल का उपयोग करने का कोई तरीका है डेटा को दो अलग-अलग तालिकाओं में लोड करने के लिए? यदि नहीं, तो यूनिक्स कमांड लाइन उपकरण इस के लिए सबसे उपयुक्त क्यों होंगे? नहीं, सीधे नहीं। लोड डेटा केवल एक तालिका या विभाजन तालिका में सम्मिलित कर सकता है। आप क्या कर सकते हैं डेटा को एक

php - How do you use a variable in a $_POST[] -

I have to walk again through the bunch of dynamically generated fields, but it does not work: $ population_activity = $ _POST ['$ current_location_id']; I have a list of places with populations on one page; I need to make it so that you can update many of them once. That's why I made the field names dynamically in accordance with location_id when the post is submitted, I have to run again as soon as they are, but it seems that you can not put a variable in a post. ($ X_count = 1; $ x_count & lt; = $ zone_width; $ x_count ++) {$ for yolkount ($ y_count = 1; $ y_count & lt; = $ zone_height; $ y_count ++) for result = Mysql_query ("SELECT * from location where location_join = '$ region_id' and x_location = '$ x_count' and y_location = '$ y_count'"); $ Current_location = mysql_fetch_array ($ result); $ Current_location_id = $ current_space ['id']; $ Population_sableness = $ _POST ['$ current_location_id']; $

c# - Adding html to CreateChildControls() method -

I am using MOSS 2007 within my CreateChildControls () method in my webpart, I have the following code: Protected Override Zero CreateChildControls () {base.CreateChildControls (); Panel myPanel = new panel (); MyPanel.ID = "SelectionPanel"; This.Controls.Add (myPanel); This.myGridView = New GridView (); CreateMyGridView (referee myGridView); MyPanel.Controls.Add (myGridView); This._btnUpdate = New button (); This._btnUpdate.Text = "Update"; MyPanel.Controls.Add (_btnUpdate); This._btnUpdate.Click + = New EventHeader (_btnUpdate_Click); } My question is how to insert html so that I wrap a div around these controls, without RenderWebPart () Method. I am trying to get it because I do not want to use a panel whose ID will be a self-agent Client ID. Many thanks, I'm not sure if any reason Because it will not work for any webpage, but it seems that the move to web user control: protected override zero CreateChildControls () {base.CreateChildCon

Can date ranges in a Silverlight (Chart) LineSeries be compressed? -

In my chart, the X-axis is a date value Y-axis is a positive integer My dataset is usually one or two There are more than a day and then there is no data for a month or so, one more two-day activity, then another extended period of inactivity. How long duration of activity and inactivity really does not really have any patterns. What I need to do is insert the X-axis in areas where there is no data point. Therefore, the x-axis will not be on constant scale. Is there any way to do this? Thank you. Can you try to create your own custom axis or series ..?

iphone - got EXC_BAD_ACCESS when I Cancel a Asynchronous web request by using ASIHTTPRequest -

I have no problem running the sample code below in the iPhone simulator, but when I run it in the iPhone, I always When I call [cancel asiRequest], get an EXC_BAD_ACCESS Anybody can help? Thank you. ASIHTTPRVEVEST * ASIRIEST; - (IBAction) request1 {NSLog (@ "Request Request"); [Send send quote]; } - (IBAction) cancel1 {NSLog (@ "request caceling"); If (ACRYAST) [ASIRC CANCELED]; } - (zero) Send request {asiRequest = [ashiRTPR request request with url: [NSUr URL: YouthString: @ "http://maps.google.com/"]]; [Delegate Set AsiRequest: self]; [AsiRequest startAsynchronous]; } - (zero) Requested: (ASIHTPPRQUEQUEST *) REQUEST {NSLOG (@ "request"); AsiRequest = nil; } - (Zero) RequestFell: (ASIHTPPREEstei *) Request {NSLog (@ "Request Error =% @", [Request Error]); AsiRequest = nil; } After checking the API, I think I should not release it in request, such an issue or request Can you release? - (zero) Cancel {#if DEBUG_REQUEST_S

c# - How do I get the username of the currently displayed profile in a SharePoint Webpart for MySites -

I am writing a web part that will be displayed in public SharePoint My Sites. This section will display some third party information for the user whose profile is being displayed. For example, if UserA is viewing a UserB profile, it will show some information about UserB. How can I get the Username 'UserBy' in WebPort code? Is this 'Account' query string safe to use the ultimate, or is there another way to do this from the SP object model?

Alternative to <table> layout in HTML -

So right now I have a webpage setup with a couple of overflow with just one size of the browser window: scroll In it, the page is originally organized into two columns and three lines of a line. My page (in short): & lt; Table & gt; I do not want to use tables for style / formatting, so my question is how I will do this migration. ; & Lt; TR & gt; & Lt; TD & gt; & Lt; Div style = "overflow: scroll;" & Gt; & Lt; Div & gt; Luggage 1 & lt; / Div & gt; & Lt; Div & gt; Stuff1A & lt; / Div & gt; & Lt; / Div & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Div style = "overflow: scroll;" & Gt; & Lt; Div & gt; Luggage 2 & lt; / Div & gt; & Lt; Div & gt; Luggage 2 a and lieutenant; / Div & gt; & Lt; / Div & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Input type = "submi

What are the applications of binary trees? -

I am thinking that what specific applications of binary trees are, can you give some real examples binary-tree is meaningless - they are not a data structure, but a family of data structures, With all the different display characteristics Although it is true that unbalanced binary trees search for self-balance binary trees perform badly, many binary trees (like tries to binary ) for which "balance" has no meaning. Applications of binary tree - Many and sets in libraries in many applications used Data such as objects is constantly being accessed, such as search applications. - To determine the video game used in almost every 3d, what objects need to render. - Router-tables are used in almost every high-bandwidth router to store. - The p2p program and specialized image-sign in which a hash needs to be verified, but the full file is not available. - Used to implement efficient priority-queues, which are used for scheduling processes in many ope

how to code a condition: 'can this string be converted into a date type'? (ruby) -

Can I code this condition in some way in Ruby? I need to know the if any string can be converted to a date , the only way to do this is date.parse ("my string") and the exception is there any other way? date_scraped_from_the_net = "20 December 2009" or "Today" if date_scraped_from_the_net is not of date type need_to_be_updated = true end If you need a sophisticated date parsing, I will try. However, if I understand your specific question, you would like to use Rescue to conditionally use methods to increase errors: if (date.parse (date_scraped_from_the_net) salvage zero) need_to_be_updated = true end

java - Use ClickHandler with a native Javascript object? -

In Javascript, I am creating a SVG shape and adding a click handler to it like this: var rect = document.createElementNS ('http://www.w3.org/2000/svg','rect'); Rect.addEventListener ('Click', myClickHandler, Incorrect); This works great, I'm trying to create an overlay restore class in GWT. If possible, I would like to do something like this: public class SVGRAct javascript object {public resident Zero AddClickHandler (ClickHandler handler) / * - {addEventListener ('click', handler, false); } - * /; } In this way I can pass a 'normal' GWT handler to this class, and can use it as a standalone other GWT UI element. I'm not sure how to do the clickhandler object in the implementation of the original Javascript of the object, though how? Thanks Because you pass ClickEvent Requires ClickHandler.onClick and it has a problem getting it from JavaScript (AFAICT) - I will go with a slightly different, more "normal&qu

c# - Do large enterprises utilize mocking/stubbing? -

Has anyone worked on a large company, or a huge project, which is successfully using unit testing? Our current database has ~ 100 tables, in which there are ~ 100 total roots. Altogether there are ~ 4000 columns, and when completed, there will be ~ 2 million line codes. I was wondering - did companies (or very large) with databases of this size actually try to fake / stub their domain objects for testing? It has been two years since working in a large company, but at that time tests were conducted through all major application integration tests. Generally, unit testing was generally strong, if it requires more set-up. I think unit testing is being wasted for some time but there are stable methods, as long as our test methods are longer or longer in writing compared to the actual code ... especially In order to make things worse for setup / arrangement, one of our developers tells us that Kent Beck's Chrysler project was such a delicate failure of unit testing and playful me

Create Sql Server Backup on Local Machine -

I am using SQL Server Management Studio running on my local machine. I use a studio to create a remote box (database engine) and a database backup that is saved on a drive on the remote box. How can I save a backup to the drive on my local machine? Look at the section for sharing a network, for example: Backup your database to database DISKS = '\\ some michine \ backup \ yourDatabase.bak'; Backing to a file on a network To access a remote disk file, share it for SQL Server, SQL Server Service account needs access to the network share in it to include the necessary permissions for backup operation to restore the network and restoring tasks to read from it. The availability of the network drive and permission depends on the context that the SQL Server service is running: When a domain user account is running SQL Server, to back up a network drive , The shared drive should be mapped as a network drive in that session, where SQL Server is running. If you s

operators - What does << mean in java? -

I do not know that & lt; & Lt; This means in Java, because I can not find it on Google, I'm totally lost! The code in question is: public int getRGB () {return ((red & lt; 16) ) | Blue); Itemprop = "Text"> left shift of bits If red == 4 (which is in binary: 00000100) then red & lt; & Lt; 16 will include sixteen-bit bits on your right, yield: 00000100000000000000000000 which is 262144 in decimal

android - How to remove application shortcut from home screen on uninstall automatically? -

I am developing an application that should add its shortcut to the home screen after installation and uninstall it Has been removed after. The application will be pre-installed on the end-user device, but there should still be an option for uninstallation). This work looks very simple, but I have faced many problems in implementing it. What I did: Add Shortcut at Home Manually com.android.launcher.action Remove the shortcut usingININSTALL_SHORTCUT. What I can not (and almost give): Installing the application Automatically remove shortcuts on cancellation There is no way to use the intent. Action_PackageManMOVID does not get this intention because the application is being uninstalled. I did some tests and found that the only shortcut type being extracted with the application is that the shortcut created with the menu 'Add to Home Screen => Shortcuts => Application => App Activity' After uninstalling the app, those shortcu

interop - Using a C++ callback interface in C# -

I am writing an application using DirectShow to record the video - I am using the DirectShowLib, interop library I do need to do great work to do that However, now I need to get callback notifications because the samples are written in a file, so I can add data unit extensions. According to the MSDN documentation, C ++ is implemented by implementing this interface, and passing the item as a result of the method of the IAMWMBufferPass interface of a pin. Then, I created a small square that implements the IAMWMBufferPassCallback interface from DirectShowLib: class IAMWMBufferPassCallbackImpl: IAMWMBufferPassCallback {Private RecordingPlayer player; Public IAMWMBufferPassCallbackImpl (recording player player) {this.player = player; } Inform the public integer (INSSBuffer3 pNSSBuffer3, IPIN pPin, long prtStart, long prtEnd) {if (player.bufferPin == pPin & Player Player.firstBufferHandled} {player.firstBufferHandled = true // with buffer Work ....} 0 Return; }} Then I ret

java - Use Spring annotations to automatically apply Hibernate Interceptor? -

I have a hibernate session in my service class. I currently do this in Beans .xml: & lt; Bean id = "Userdog" class = "org.springframework.aop.framework.ProxyFactoryBean" & gt; & Lt; Property Name = "Target" & gt; & Lt; Ref bean = "userDaoTarget" /> & Lt; / Property & gt; & Lt; Property Name = "Proxy Interface" & gt; & Lt; Price & gt; Com.app.dao.UserDao & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; Property Name = "Interceptor Name" & gt; & Lt; List & gt; & Lt; Price & gt; HibernateInterceptor & lt; / Pricing & gt; & Lt; / List & gt; & Lt; / Property & gt; & Lt; Ability value = "Proxy" /> & Lt; / Bean & gt; ... & lt; Bean id = "Hibernate Interceptor" class = "org.springframework.orm.hibernate3.HibernateInterceptor" & gt; & Lt; Property Name = "s

javascript - Popup box with a timer -

After the specified idle time (say for idle time 10 minutes), the application should pop up a pop up box with a timer Display as 60 59 58 ... 1), that box should be closed within 60 seconds with option option and should close that browser if the user chooses no option if the user can cancel within 60 seconds. Chooses the option, then it will be closed Ahia. To show the popup box I am using setTimeout ("pop ()", 600000); The way to include a timer is that at least that box should be closed within 60 seconds, if the user does not choose an option, is there a solution for this? You can try entering the code below in your popup window. & lt; Script & gt; Function Metimer () {setTimeout (function clallion () (window.close;}, 600000);} & lt; / script & gt; body onload = "mutimer ();" & gt; < / Pre>

php: catch exception and continue execution, is it possible? -

Is it possible to hold the exception and continue execution of the script? Sure, just catch the exception where you want to continue execution ... < Pre> try {SomeOperation (); } Hold (some expedition $ E) {// nothing ... PHP will ignore and keep going} Of course it is a problem of leaving it quiet that can be a very important error Some operations () may be difficult to understand other subtle problems, but you will never know that you quietly leave the exception.

iis - ISAPI Rewrite wont proxy the root folder -

I was not sure whether this is a ServerFault question or stack overflow, so I'm going to ask it here first. While using ISAPI rewrite (Helian Tech), I can not find a root directory proxy Subtitles will work on other servers, but only plain old '/' work Here is a copy of my .htaccess # helicon ISAPI_revinated configuration file # version 3.1.0.69 rewritebase / rewriter (. +) Rewriting engine at http: / / Internalsite / $ 1 [P] & lt; Helicon & gt; ProxyConnect Time 120 & lt; / Helicon & gt; There is no default document in the InternalSite, because it uses mod_rewrite (wordpress). but just plain old '/' will not work This can be because you have to type the Sense again and then (because you do not have any more characters yet please try to fix your configuration like this: RewriteBase / RewriteRule (. *) On the re-engineer engine http: // internalsite / $ 1 [P]

SQL Server Database analysis using T-SQL -

I have a small application that has approximately 38 tables in the database (SQL Server 2000/2005). Now I want to know how much data they are using using T-SQL (not in the KB / MB records). By saying better, I want to analyze the whole database. Is this possible? how ? If you want to find the place of each table, you can use the following: / P> USE yourdbname EXEC SP_MSforeachtable @ command1 = "EXEC sp_spaceused '?'" for further reading

sql - counting number of entries in a month -

I have an order table, and it has the order-date column, which is called order_date. I have to calculate the number of orders of each month in 2009. How do I do this? Select the month (order-date) as the order, calculation (*) Order by order in order of order where year (order_data) = month by month (order_date) order (order_date) for reference, see Transact-SQL and command.

Java Swing JList -

I am using a jellist in Java swing, but when my dialog opens, the list is not displayed. Private JLITs (Zest) (if (MyList == blank) {mylist = New Jellist ()); Mylist.setSelectionMode (ListSelectionModel.SINGLE_SELECTION); Mylist.setSize (new dimension (154, 106)); Model.addElement ("test"); Model.addElement ("Zwei"); Mylist.setVisible (true); } Return my marital status; } The list is defined: Private JPanel getJContentPane () {if (jContentPane == zero) {jContentPane = new JPanel (); JContentPane.setLayout (new border layout ()); JContentPane.add (getJList (), border layout .ca); } Return jContentPane; } This is a JContentPane (/ panel) Public Fenestrae (frame owner) {super}; Start (); } code calling getJContentPane () : private zeros start () {this.setSize (300, 200); This.setContentPane (getJContentPane ()); This.setTitle ("Auswahl"); } I do not know where you're setting up JList models? Something like this mylist

How do I get the Perl's DateTime::Format::DateManip version number from the command line? -

मैं इसे कमांड लाइन से प्रयोग कर रहा हूं: perl -MDateTime :: format :: DateManip -l 'print $ Some :: मॉड्यूल :: VERSION' लेकिन केवल एक रिक्त पंक्ति, किसी भी विचार वापसी? यह छद्म कोड है, कुछ ऐसा नहीं है, इसलिए यह सिर्फ undef को छपाई कर रहा है -l ध्वज, जैसे perl -l'print undef ; सबूतों के लिए -w $ perl -MDateTime :: Format :: DateManip -wle 'print $ Some :: मॉड्यूल :: VERSION' uninitialized value का उपयोग $ कुछ :: मॉड्यूल :: VERSION प्रिंट में -e लाइन 1 । विकल्प: कुछ :: मॉड्यूल जिसमें आप मॉड्यूल का संस्करण चाहते हैं। इसके अलावा, बस मस्ती के लिए;) परीक्षण संस्करण संख्याओं के लिए पर्ल शोर्टैंड ये संस्करण संख्याओं को उपयोग & lt; module & gt; & Lt; संस्करण & gt; सिंटैक्स और पर्ल की वर्क अस्वीकृति संस्करण जो कि नई पर्याप्त नहीं हैं। ये सभी एक पर्ल स्क्रिप्ट बनाते हैं, जो का उपयोग करें दिनांकटाइम 99 99; $ perl -MDateTime \ 9999 दिनांकटाइम संस्करण 9999 आवश्यक है - यह केवल 0.51 संस्करण है BEGIN विफल - संकलन निरस्

language agnostic - Is my understanding of type systems correct? -

The type of the following statements reflects my understanding of the system (which java is suffering from outside the world on very little hands) ; Please correct any errors. Fixed / dynamic distinction looks clear: Static typed langauges assigns each variable, field and parameter to a type and compiler Prevents the work between incompatible types. Examples: C, Java, Pascal. In dynamically typed , variables are treated as normal bins, which can keep anything you want - types of types only on runtime Checks (if only) actually act on values, when you assign them. Example: Smalltalk, Python, JavaScript. Type typing types with type orientation contexts (and have some advantages) to look like people typed in dynamically, so that you do not need to declare them most of the time - But in dynamic languages, you can not do this, use a variable to start a string, and then assign an integer. Example: Haskell, Scala I have a strong / Weak distinguish I'm pretty sure abou