Posts

Showing posts from August, 2015

c# - Finding out the DateTimeFormat obtained when DateTime.ToString( ) is called -

I have the following problem with handling datetime formats for the development of a component. string value = date. Now.ToString (); // value = "8/3/2010 2:20:49 PM" How do I find that the date format refers to value -> I want to store this current datetime format during export and use the same during import. Many APIs available in DateTimeFormatInfo.CurrentInfo and Culture IFFO.SharraCulture.DatimFormat do not provide this information. I know that using a solution DT is to use. Toasting ("You") to store and parse the universal format in daytime, but I'm curious how I can get the format above. To copy the documentation: DateTime TowString () The value of this example is formatted using normal form specifier, 'g', as described in the formatting overview topic. The return value is the same as the value given by ToString ("G", null) . Overview of document links -> Date and time format string G Normal da...

How to provide your own LocationProvider on Android? -

How does anyone provide to their place provider and publish it on the system, so other apps have a reference about it Can the location manager get? You can apply for duplicate location providers for development and testing purposes. The application needs to enable "Allow mock locations" in the developer options to see For a code example, see the GPX playback: Code file android / src / com / Twolinessoftware / android / playbackservice.java for registration of the location provider. If you want a "real" location provider (such as to implement your functionality as part of an end-user application), some sources say that it can not be done when As long as the provider is not in a package signed with the system key, you will have to create your own rom from the source, sign it with your key, from the same location on your location provider When Sr and install both on your phone. However, at some points the Android introduced "Unbundle" to t...

asp.net - Custom implementation of IPrincipal throws System.SystemException: The trust relationship -

We have an ASP.NET site that relies on form authentication for the requested login credentials, although implementation of the IPrincipal is complete However, when a site is run on a particular server (which is semi-rigid in terms of security), crashing on IPrincipal.IsInRole () during application messaging Gets: System.SystemException: Primary Domain and Wish Reliable fail trust relationships between domains. This indicates a communication error between web-server and DC, however, since our application is not exactly using Windows authentication, I do not know why it is necessary to communicate with DC . This is my implementation: [serialable] public class custom principal: IPrincipal {public custom principals (IUser userObj) {this.Identity = New CustomIdentity (userObj.Id) , UserObj.Username); } Public Bull Isinol (string roll) {if (roll == empty) returned incorrect; Var roles = hpptex Running Session ["Authentication-roles"] as string []; If (roles == faucet...

objective c - how can i copy the text in the textfield cell (in cocoa) to NSPasteboard? -

I have a text button in the textfield cell and cocoa. I want to make a copy of the text in the text text field by clicking on the button. In the clipboard. #import & lt; Cocoa / Cocoa H & gt; @Interfaces clipboard: NSBECES {IBotlet ID but 1; IBOutlet ID numf2_1; NSPasteboard * Pasteboard; } - Write (BOOL) pasteboard: (NSString *) Stringroot; - (NSString *) readFromPasteBoard; - (id) Init; // - (IBAction) insert_cb: (ID) sender; Clipboard @end "clipboard .h" // @ implementation clipboard @ Implementation clipboard // - (IBAction) insert_cb: (ID) sender {- (id) Init { [Super Init]; Pasteboard = [nsptboard general pasteboard]; Self return; } - Write (BOOL) Pasteboard: (NSString *) stringTourSiteSite {[Pasteboard declared type: [NSArray arrayWithObject: NSStringPboardType] Owner: Zero]; Return [Pasteboard SetString: Type for StringsOoote: NSStringPboardType]; } - (NSString *) readFromPasteBoard {Return [Pasteboard StringForType: NSStringPboardType]; } @end ...

delphi - How to use a TcxCustomDataSource in a TcxExtLookupComboBox? -

I use TxxExtLookupComboBox from Dexxpress and try to apply custom data source. I have set up customdeters in such a way: processing TMainForm.FormCreate (Sender: TObject); Start fDataSource: = TMyDataSource.Create; CbotestSearch.Properties.View.DataController.CustomDataSource: = fDataSource; End; TMyDataSource is defined here: the unit data source; Uses interface classes, IBITI, SUUSUtils, CXSwistadata; Type TSearchItem = Class Private Bold ID: String; Display: string end; TMyDataSource = class (TcxCustomDataSource) Private fSearchList: TList; Protected function GetRecordCount: integer; Override; Function GetValue (ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle): Variants; Override; Make Public Builders; Destruction of Destruction; Override; Process GetData; End; TMyDataSource.Create the Implementation Maker; Start the heritage; Create; FSearchList: = TList.Create; End; Distributor TMyDataSource.Destroy; Start Free and Neil (FSXL); inherited from; End; ...

php - Regular expression for <a> tag replacement -

I am new to regular expressions, but I am trying to learn about it. I want to remove the tag of an HTML text, and just want to leave the internal text. Something like this: Basic: Ads & lt; A href = "http://www.google.es" & gt; Google & lt; / A & gt; Advertising & lt; A href = "http://www.bing.com" & gt; Bing & lt; / A & gt; Result: Google AdSense Bing I am using this code: $ patterns = array ("/ (& lt; a href = \ "[A -z0- 9.: _ \ - \ /] {1,} \" & gt;) / i "," / It works, but I do not know whether this code is more efficient or more readable. Can I improve the code anyway? In your case, PHP should be done in the exact same way without any regular expressions. If you want to touch only a specific tag (some strip_tags () can not by default), then there is a function in it. In general, regexes are not suitable, it is better to use DOM parser to parse HTML or any of these

adding some ajax to rails app using jquery -

I have a simple drop-down box on a page with the code below: & lt; P & gt; & Lt;% = f.label "Group"% & gt; & Lt; Br / & gt; Select & lt;% = ("Employee", "Group_ID", group.Collect {| p | [p.name, p.id]}, {: include_blank => true})% & gt; & Lt; / P & gt; & Lt; Div id = "employee" & gt; & Lt ;! - This will be filled with AJAX request - & gt; & Lt; / Div & gt; This shows the group to the user. What do I want is a division next to this drop down, which shows the number of employees related to a group. I get this number: Groups.employees.count But I do not know how this will work with Ajax like drop down changes To get this number you have to go back to the server and then update the div. If I need to, I can use jQuery, possibly: write all the groups with all the counts in the HTML or Javascript variable, and to control the use of JavaScript only to appear at any one...

iphone - How to construct IBOutlet names in code in order to change them? -

Let me assume that I have many UILBels installed in IB and that the codes are connected to IBOulets (label 1, label 2, label 3, label 4) How do I get these variables inside the code , So that I can change the text of each one in the loop, where the labels are taken from NSARRA. labelArray = [NSArray arrayWithObjects: @ "this", @ "array", @ "is", @ "a", @ "Random", @ "zodiac", @ "of", @ "item", zero]; For (int i = 0; i & lt; [labelArray count]; i ++) {// labelx ibotlet lablex.text = [Label Array object is the creation of the index: } How do I create 'labelx' above? Can it be done using blocks? You must initialize the array to a place, labelArray = [NSArray arrayWithObjects: @ "this", @ "array", @ "is", zero]; UiLabelArray = [NSArray arrayWithObjects: label 1, label 2, label 3, zero]; ( ) then (int i = 0; i [uiLabelArray count]; i ++) {[ UiLabe...

sql - Cannot open database "DBName" requested by the login. The login failed. Login failed for user 'MachineName\User' -

I have created a web application but I am getting this error when trying to add DB Can not open database "DBName" login requested by login failed. Logging in for username 'MachineName \ User' failed. I have also tried to manually add but this error gives the error that the login exists with different username .. but this DB does not show in the permissions list. Any thoughts? Thanks see here

c# - Environment.SpecialFolder.ProgramFiles value for a 32-bit application on Windows 7? -

Windows for 32 hours down & nbsp; 7 What will be an application running on return? EnvironmentalGetFolderPath (EnvironmentalFeaturesFolderProfileFile) C: \ Program Files (x86) or On C: \ program files 32 bit Windows 7 you should get "C: \ program file", "C: \ Program Files" at 64 bit C: \ Program Files (x86) ".

.net - How do I programatically create an exchange 2010 mailbox using C# -

I have been given a task to write a program to create a 2010 exchange mailbox automatically. My research tells me to use powers but I can not find the namespace for reference and I want some sample code. I got some code on the web but I do not know what is the namespace for PowerShell, I think This system can be. Management. Automatation But when I try to reference the namespace it is not present in the list of dots. text"> When I did this, I would like to download powerhales separately Not sure, this is still the case. You can get it from Here is an example that will create a mailbox: SecureString password = new SecureString (); String str_password = "pass"; String user name = "userr"; String live connection URI = "http://exchange.wenatex.com/Powershell?serializationLevel=Full"; Foreign language (four x in strap password) {password.AppendChar (x); } PSCredential credentials = new PSCredential (username, password); // Set connection ...

winforms - Question about changing dialog box layout -

Hey, I just started designing the dialog boxes and windows, and I had a basic question. When you use something like a window installer, it has the next button, and when you click it, the layout completely changes the layout to the next step. My question is, it is loading a completely new dialog box and getting rid of the last one. Or there is no way to make a dialogue with many pages / states (not sure what to call them). Thanks in advance for any help. Wizards are usually created using the control from the library. They do not create a new dialog, but instead use something similar to tab pages.

asp.net - Using <asp:EntityDataSource> -

I am using EntityDataSource control to display data in the grid, I do the same EntityDataSource to display all data Search is the way to use, the problem is that I can only do one thing or it can be used to get the whole data or to get the whole data This is my .aspx page & lt; asp: EntityDataSource id = "InvestorsSource" runat = "server" ConnectionString = "name = units" DefaultContainerName = "units" EnableFlattening = "false" EntitySetName = "investors" EntityTypeFilter = "Investors in =" select "it. [InvestorId] it. [. InvestorName], it [summary], this [logo], it [EmailAddress], it [PHONENUMBER], this [website] "AutoGenerateWhereClause =" right "orderBy =" this [InvestorName] "& gt .. ... & Lt; WhereParameters & gt; & Lt; Asp: FormParameter FormField = "txtSearchInvestor" name = "investor name" type = "string" /> & Lt;...

3d - How do I convert a mobile phone GPS to x,y,z with origin at the center of the Earth? -

I need to visualize numbers coming from iPhone (and other) GPS data correctly in 3D. , what do I want to take a WGS 84 (right?) Point and replace that place with the origin of X, Y, Z vector in the center of the Earth. I for GPS / WGS 84 3D, but I think my search terms are not so great Do anyone have any indicators to get started? In the future, I must keep in mind the height information if available, but it is not immediately important. Thank you! Does your search represent your data in the ECEF (Earth Center Earth Fixed) notation. Some Good Things

.net - Code vs Database - Sequence of Steps, Call Database or Check Session Object? -

I have several web sequential pages that will modify a record and its child's record in the database will be called "project" . There is some special information in a project, and it consists of one or more tasks, each of which has specific information. Is it possible to be able to query the same project (and its functions) every time to hit the database (either, more efficiently or more easily) I ask once (either to save once or session for each page or all pages) and check the saved object instead of the database? Note that I'm asking about checking the data, not saving it (I can still press the database every time I have to save something, obviously). Enter the database ID in the session and rest the database. Is there a web server on the database and on the same server, if that is the database will cache those results and still return that data very fast? I'm thinking of a simple site, if you talk about Twitter / Facebook Scale, you have got a...

sorting - Sort by proxy (or: sort one container by the contents of another) in C++ -

I have a set of data that is divided into two arrays (let's call them data And key ). That is, with the index i for any item, I can access the data of that item with the data [i] and for that item the key keys [i] . I can not change this structure (i.e., to press the keys and data in an array), because I have to pass the data array for a library function that is expected of a particular data layout Does. key Create a vector of objects, which will be indexed for two arrays. Operator & lt; Define for that object to compare based on keys [index] . Sort the vector when you are finished, leave that vector and keep your original objects in the order defined by those proxy objects: // Warning: Unwanted code. Struct sort_proxy {size_t i; The Bull Operator & lt; (Sort_proxy const and other) cost {return bracket [i] & lt; Key [other]; }}; // ... key_size = number of keys / data items std :: vector & lt; Sort_proxy & gt; Proxy (key_size); For ...

sql - How to store ordered items which often change position in DB -

I should be able to store a large list of items ordered in DB. So far it is straight-forward: id position other fields 1 45 ... 2 4736 ... 3 514 ... ... When asked in these, I always need to get some things (filtered based on other fields), but in the correct order. By putting an index on the basis of the situation and also using the "order by position". Issue now : Items often change their position, and not only to 1 or 2. The situation in ID2 varies from 4736 to 2000, I need to update the status of all the elements between our position and the old condition 2000 and 4735, adding 1 to each line. And this is not just an ID that changes per transaction, but there may be several transactions within a few more times. I think the best way to handle the update issue would be using a linked list instead of the status column, where I added my predecessor to its old I can remove the ID2 from the position and then add it somewhere between its new predecessor and succe...

Does ExceptionHub break Selenium's wait_for_page_to_load command -

I just added exceptions (a Javascript error tracking service) on our website, but all my Selenium tests are now failing Are there. When I look at the selenium output, it says that the waiting time is over. If I run a trial at the local level, then I think the page load is fine, so I'm not really sure why Selenium waits, is anyone else able to work with the selenium with exception HB? I have seen similar problems with UserVoice, often the rest of the page loads, but still userVoice And waiting for the exam will end. If you do not start loading ExceptionHub, it can help until the rest of the page is loaded. Of course this would mean that you do not get any JavaScript errors during page load ...

regex - Javascript RegExp Result -

यदि आप नियमित अभिव्यक्ति / (this | a) / अब अगर मेरे पास: var text = "यह एक वाक्य है।"; पाठ = पाठ। स्थान (/ (यह | एक) / जी, "_"); document.write (पाठ); मुझे आउटपुट मिलता है: _ _ _ _ _ मैं जावास्क्रिप्ट के एक टुकड़े पर काम कर रहा हूं जो चुनिंदा स्टाइल करता है जिससे मैं चाहता हूं करना है '& lt; span class = "className" & gt; "+ word_in_regex +" & lt; / span & gt; " जहां word_in_regex उस अभिव्यक्ति से शब्द है जो कि है क्या यह संभव है या नहीं? आप $ 1 का उपयोग कर सकते हैं पहले समूह के मिलान को संदर्भित करने के लिए प्रतिस्थापन स्ट्रिंग: "यह एक वाक्य है।" (/ (यह | एक) / g, "_ $ 1_") // " _this__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ जी फ्लैग को नोट करें; अन्यथा केवल पहला मैच बदल दिया जाएगा। देखें और अधिक जानकारी के लिए।

ios - UIWebView: Can I disable the javascript alert() inside any web page? -

I am using UIWebView to load the URL. In the form of javascript, in the form of that URL, it uses the warning ("whatever msg"). My UIWebView will pop up a window and it will show a warning message. Is there a way to disable such popup windows or JavaScript warning windows? After adding it, its contents have been loaded in your web view [MyWebView stringByEvaluatingJavaScriptFromString: @ "Window. Warning = Null,"];

java - Is there a portable way to have "SELECT FIRST 10 * FROM T" semantic? -

I want to read data from the block of 10k records from a database. I found it on Wikipedia and it is clear that it can not be done with SQL in a portable manner. There may be another method which provides several ways to ask questions, but how can I decide that enough rows have been read, did not indicate this through callmax such as Rome Mapper and ResultSetExtractor Can be gone, that enough data has been read. Edit: I was looking for a solution for the JDBC templates, it suggests using it which I ignored. Hold Will handle Being hibernate can pignet you using and eg session.secure (user.clash) .adorder (order .asc ("id")) .setFirstResult (0) // Index of first line to be retrieved. .setMaxResults (10) // The amount of rows to be received. .list (); You can do the same in JPA and. list users = em.createQuery ("Choose and select from user u order from UUID"); .setFirstResult (0) // Index of first line to be retrieved. .setMaxResults (10) // The ...

Using Amazon EC2 as a webserver with a specific IP address -

I am trying to create a personal / professional website within a college / domain. From the University, I have requested a static-IP address that has been directed to the website name "". I want to set up an Amazon EC2 instance to host a website. I know how to create / administer websites on EC2 example, I do not know how to talk with EC2 example IT University at University (and Vice-President) University was not very helpful. I know how to set up a local machine as a webserver, it is not that how to put Amazon EC2 example "sit" at university. If you want Amazon's EC2 example "sit inside your university" / p> This service is still in beta, but it is publicly available for approximately one year. Connection currently costs $ 0.05 per hour (approximately $ 36.5 per month) and you also pay for data transfer.

c# - .NET: Local date format from language tag/culture? -

Seeing a cultureInfo object or language tag (such as "N-US") string, there is a function that I The default date time string format (such as "mm / day / yyyy") For example: // Display the short date format of PT-BR culture / dd / MM / yyyy CultureInfo culture = new CultureInfo ("pt-BR") ; Console.WriteLine (culture.DateTimeFormat.ShortDatePattern); // Full Date of PT-BR Culture / Time Dateline / DDDD, D'DMMMM 'D' YY H: MM: Display Using SS Console 'Prakashline (Culture, Datetime Format, Phulidate Technique);

css - javascript jquery slide out tab -

jquery स्लाइड आउट टैब मेरे फ्लैश पर जा रहा है कैसे हल करें? फ्लैश के "पारदर्शी" के wmode पैरामीटर को सेट करें इसे देखें अपना कोड इस प्रकार बदलें: AC_FL_RunContent ('codebase', 'http: //download.macromedia.com/pub/shockwave/cabs/flash /swflash.cab#version=9,0,28,0','width','218','height','386','src','working','quality','high','pluginspage ',' Http: //www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version = शॉकवेवफ़्लैश ',' मूवी ',' काम ',' वामोद ',' पारदर्शी '); // & lt; --- यह जोड़ें!

java - Can I implement multiple callback interfaces in C++? -

Can I apply multiple callback interfaces in Java to C ++? The answer is no. You can only apply a callback interface in C ++ and for this something very There are good reasons. The callback mechanism depends on the fact that there is a Java type that implements the callback interface. If you implement multiple callback interfaces in C ++, you can collect several Java implementation types in C ++. Each type will only have to handle its callback methods, but it is not how to manage callback methods of other collective types.

How to identify whether the control is going inside the window / tab control bounds in WPF -

I make the control height as double when the mouse is on that control and the control height should be normal when the mouse Control. Consider when the button is on a button, so I am using the following style to make the height of the button twice. : type button} "& gt; Style.Triggers & gt; Trigger Property =" Ismouth Over "Value =" True "& gt; Setter Estates = "RenderTransform"> Setster.Value> & lt; /Setter.Value> & lt; / Setter & gt; ; & Lt; Setter Property = "Render TransformAgren" value = "0.5,0.5" /> gt; Setter property = "Panel.ZIndex" value = "99999" /> & gt; & gt; / catalyst & gt; LT; /Style.Triggers> If the button is placed near the window / tab control limit, then the button controls the tab control / window boundary When it is spread (when it is on the mouse button) I do not want the button to go inside the tab control / window ...

mysql delete on join? -

मैं का उपयोग कर सकते हैं sent_txts से LEFT JOIN प्राप्त_टीएक्सटीएस आर s.msg_link_id पर = R.id WHERE r.action_id = 6; शीर्ष मिलान करने वाली पंक्तियां, मैं दोनों पक्षों की मेलिंग पंक्तियों को हटाने के लिए एक क्वेरी कैसे लिख सकता / सकती हूं? कुछ ऐसा > send_txts को हटाएं LEFT JOINED_txts आर पर s.msg_link_id = r.id WHERE r.action_id = 6 हटाएं; अस्वीकरण: इस समय परीक्षण करने के लिए मेरे पास एक mysql डेटाबेस की पहुंच नहीं है, लेकिन मुझे लगता है कि आप इसका उपयोग कर सकते हैं: हटाएं, send_txts से r भेजें s_msg_link_id = r.id पर आरक्षित_टीक्सट आर ​​से जुड़ें, जहां r.action_id = 6; अधिक जानकारी के लिए mysql के दस्तावेज़ देखें। एक बेहतर तरीका हो सकता है कि प्राप्त_टीएक्सट्स से भेजी गई विदेशी कुंजी बाधा को भेज दिया जाए, और हटाए गए कैस्केड हो।

asp.net - add jquery tab from outside page -

I have an application that allows jquery tabs to open different "asp.net" applications from their "menus" tab uses it. The contents of the tabs have an IFrame with the application. What I need is for one of the Applications tabs, which is under the IFRAME to open a page in a new tab. I am running apps in iis 7 with asp.net. How can I send a signal to the "tab" application to open a new tab?

Javascript detection script -

I need a JS detection script which enables the user to enable JS on a separate page Will redirect. Like a paradox, is not it? The answer can not be a script, because JS is not enabled if no script is executed. You can embed HTML inside a noscript tag, and this content will be included only if JS is not enabled. & lt; Noscript & gt; & Lt; Meta http-equiv = "Refresh" content = "0; url = http: //example.com/no_js.html/" & gt; & Lt; / Noscript & gt;

javascript - How do I make an image partially scroll, then stay fixed, then scroll when you pass a section? -

I also do not know what I want to do please see instantly on this page : You will see Plasma Pong and an image under the heading, on the left side, when I scroll through the text, I like that as long as the page is scrolled. However, when you get to the bottom of the page, you will get a notice, there is a footer and there will not be enough space for the title and image if I make it completely stable. I want to be kept as a footnote hit, then scroll. When you scroll back to the page, it will scroll a little bit, unless it's in the room, then stay again. There is only one effect, but to see any idea in reverse how can I do this? Set CSS status to stabilize the title. Then use javascript to detect scroll events, when some criteria are met, it resets it to a complete position so that it stays above the footer. Then when the page is scrolled away from the footer, then remove the full position. To see an example of work, go to quirksmode.org. In your articles, he sees ...

.htaccess - Using htaccess to serve sitemap from a remote server -

Whether to show my sitemap on a main server from a remote server Say Mydomain .com / sitemaps / filename.xml its content remoteserver.com/sitemapts/mydomain-sitemap-filename.xml and how to get it Should I do this in HTACAC? Thank you .. Yes, but it must be enabled on the server if If you do not control the server itself, then this may be a problem. Assuming that it is available, and mod_rewrite is also available to you, you can do something like a .htaccess in your site root File: Revive Engines on Rule Rule ^ sitemaps / (. *) \. Xml $ http://www.example.com/Sitemap/% {HTTP_HOST} -etemap- $ 1.xml [P]

Basic multi-threading in C / C++ -- hints, advice, tutorial, some direction? -

I want to learn how to prepare a multi-threaded app, but I do not even know where to start How do most people apply multi-threading? Do they use the boost library? Is there any other way to do this? (Using standard C / C ++) I understand this concept, but I do not know exactly how to actually do it, to start learning too. Can anyone recommend something? & lt; --- Is this standard C ++, or some Microsoft-only implementation? Am I correcting that multithreading libraries have been included in Windows API? I have found an example on MSDN () and it uses (release mute, etc.), looks in windows.h. What is it that most people are using while programming Windows? Boost Library is a cross-platform way to use a thread. Most people use it or Pthreads were originally used on POSIX systems, but there is also a port that allows menus to use it on windows. If you absolutely need a cross-platform solution, or have already been linked to the boost library. If you are developing ...

runtime.exec - How to run linux commands in java code? -

I want to differentiate between two files I tried to search for code in Java, but for this there is no simple code / Utility code was not found. Therefore, I thought that if I can run Linux defiff / sdf command in some way from my java code and can return it to a file that stores the difference then it would be great. Let's say that two files are file A and file B. I should be able to store my DIFF file in my file using a file named File Def by java code. Receiving data from file ID will not be a big deal. runtime. Method:

java - Enable a currently disabled Spinner in Android -

I was fooling around with Android and my Java knowledge was best (for example, I'm upset with this fact That it allows inline squares !?). My question is as follows: I have a layout where there are three dropdown menus, I initialize all three of them in the form (). The first takes its value from a string-array; Second, however, depends on the first choice and the third depends on the choice of the other in turn! I have some string-arrays for the second spinner, but I think that what would be the right way to implement the list of successively capable spinners, I just wanted to hack into it and work it I am trying, but I do not want to run the risk of being faulty and unstable. For example, my case is like I have in my resources I have an arrays.xml like: In the onCreate method I started three: @Override Public Zero OnCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState); SetContentView (R.layout.main); Spinner spinner 1 = (spinner) Find ...

sql - Should stored procedures check for potential issues when executing? -

I have explained this question a bit :) I write a bunch of stored procedures I am writing a new product they have been written by developers called by C # application, which I have been following the same technical imagery. I can not go into the real technique imagination, so I'll give a closer enough example: In the sample of technology, we have to store the file data in the database with some proprietary zip files, each within the zip To store file names and locations (for example, a database for each zip file) Now, you can say that in this Tech Speak, to do "Operation A" , Hum Steps should be done: 1: Calculate the requirements of the file to be added 2: Get a list of zip files and their database connection string ( Call stored proc "GetZips") 2: Search for a suitable location within the zip file to store the file (call "GetSuitableFileLocation" procured call against each database connection until the appropriate database is received...

java - entitymanager persist -

I have a problem when trying to update the foreign key Using the merge function I always exit the memory error , Or I get timeout There are many foreign keys (many more lazy fading) in Roum Tables, curious eagerness for Raum Fakultaet and Standort @Stateless @Local (IRaumHomeLocal.class) @Remote (IRaumHomeRemote.class) Public Class Raumohom Iryamah Om {@ Presection Private Privilege Manager; Zero Merge (Raum R, Integer Fid, Integer Sid) {Fultat F = em.find (Falcultate, Class, Fid); Standpoint S = em.find (standout class, sid); R.setFakultaet (f); R.setStandort (s); . Adding F.getRaums () (R); . Adding S.getRaums () (R); Em.merge (r); } ....} Then I tried to use () instead of searching getReference () because I only want to make an update, so I have the method: zero merge (Raum R, integer fid, integer syd) {standout S = M.A.A.Getreference (standout class, sid); Fultat F = M.A.A.Areference (Falcultate, Class, Feed); . Adding S.getRaums () (R); // Now it is here f.getRaums ...

html - PHP solutions for storing forms in JSON -

Forgive my second rate google-fu, but I find it difficult to find this topic. Whatever I can know is a dirty form-generator that will suppress HTML. I am looking for an established approach to store forms (forms instead of form data) in a library or JSN format. Is there an open-source form-builder that takes simple input and creates something like standard to represent the raw HTML form field or JSON / Associate Array? ("Red", "green", "blue"}} "" "" "{" id ": {" select "]," name ", : ["Favorite_color"], "option" etc ... I think this kind of trivial problem, but before I roll my own one It is basically a templating system, and I want to at least peak on the accepted solution. Which is using JSON as its intermediate language. Is there any reason that you can find out there in the Kajilian of thermalating systems Want to use JSON instead of one?

php - Remove categoies, tagging and authors functionality from wordpress -

How can you remove tagging and authoring functionality from WordPress? That's because it does not appear in the backend for users, it will remove the categories panel from the post page and all other flim-flam I would think that WordPress's default post is a special type of custom post type that can be modified thanks. Here are some links to articles online (a plugin, perhaps the easiest Way) Some people are required to complete some manipulation to hide some specific menus.

android - Optionsmenu in an TabActivity for a specific Tab -

My problem is that I have tabactivity, which now has 4 tabs The first tab is a special tab User can modify some data. The problem is, if I add an option menu for the activity, the options menu is visible on each tab. I tried to check the current mTabHost.getCurrentTabTag () in onCreateOptionsMenu but if nothing changes it, how to do this? (The following code, which still shows the options menu on each tab) Public boolean permit menu (menu menu) {if (mTabHost GetCurrentTabTag () == GetString (R.string.tab_details)} {Boolean results = Super. Contempt option menu (menu); Menu.add (0, EDIT_ID, 0, R.string.menu_edit) .setIcon (R.drawable.edit); Return result; } Back true; } Maniteme selected on public boolean (int id, menu item) {switch (itat. ITMID)} {case EDIT_ID: {toast. Make Text (this, "O.O.", Toast. LNNHT_LOG). Show (); }} Come back super. Paramountime selected (feature ID, item); } I think you're comparing strings with == ( In fact, tags) Generally...

.net 3.5 - Export any kind of object for a further reuse? -

I am working on various data structures which are received after a long computation time. How to create an object in the first build and use this same object in another object (for time calculation) ?? I need to do this without specifying the type of object. Thanks I think what you need is serialization . Perhaps they will help you:

c# - Visual Studio build problem with "ReflectionOnlyAssemblyResolve event" -

I have a Visual Studio 2010 project that is targeted for .NET Framework 3.5 I fixes the project with Visual Studio , But when I try to compile it with the command line or teamcity, I get the following build error: C: \ windows \ Microsoft.NET \ framework \ V4.0.30319 \ Microsoft.WinFX.targets (26 9): Error MC1000: unknown build error, 'dependency on assembly can not be resolved' Microsoft.Wind Ows.Design.Extensibility, version = 4.0.0.0, culture = neutral, public token = B03f5f7f11d50a3a 'because it is not already loaded. When using the Reflection Online API, dependent assemblies should be pre-loaded or reflectionOnlyAssemblyResolve event even if on demand. [C: \ Work \ MyProject \ MyProject.sln] Linker starts complaining about Microsoft.Windows.Design.Extensibility.dll , but This project does not depend on the library. This project is bombed in an attempt to compile XAMML. Ignore the comment about the reflectionUncourage the problem in the clear message di...

java - divide array into smaller parts -

I want to divide a large byte array into smaller sections (say 64 bytes). Please help me with this. You can use the method Arrays.copyOfRange (from the original, from) public static byte [] [] divideArray (byte [] source, int chunksize) {byte [] [] ret = new byte [(int) Math.ceil (source.length / (double) chunksize) ] [ chunk size]; Int start = 0; For (int i = 0; i & lt; ret.length; i ++) {rate = i] = Arrays.copyOfRange (source, start, start + chunksize); Start + = selected; } Return return; } Or you can suggest Max to the system. Arrecopy public static byte [] [] divideArray (byte [] source, int chunksize) {byte [] [] rate = new byte [(int) math. Cecil (source length / (double) selective)] [chanaxes]; Int start = 0; For (int i = 0; i & lt; ret.length; i ++) {if (start + chunksize> source.length) {System.arraycopy (source, start, write [i], 0, source Length - start); } Else {System.arraycopy (source, start, write [i], 0, chocex); } Start + = selected; } Ret...

ECLIPSE ANDROID DEVICES DISAPPEAR -

I have a problem with the Android emulator after running your application on a device, it disappears from DDS shortly Even if it still has begun. The only way to run again is to shut down the last emulator and open it again by applying my application. Do you have any solution for this strange error? I should say that if I have a problem I can not disable my firewall, besides I tried to reset ADB but still does not work. An answer for others will come looking for a solution here. You have to restart ADB (kill-server and then start-server). More details about doing this:

java - How can I use the Parameterized JUnit test runner with a field that's injected using Spring? -

I am using Spring to inject a path to a directory in my unit tests. There are several such files inside this directory that should be used to create test data for a test case with parameters using a test runner. Unfortunately, the test runner requires that the method providing the parameters is fixed. This does not work for my situation because the directory can only be injected into a non-stationary area. Any ideas how can I get around this? I think you are using the juneit 4.x because you have mentioned the parametric test Runner means that you are not using @RunWith (SpringJUnit4ClassRunner). No problem, just list my beliefs. The following uses the spring to get the test file directory from the XML file. It does not inject, but the data is still available for your testing. And not less in a steady method. I see that the only disadvantage is that it can mean that your spring configuration is being parsed / configured multiple times, you can load only a small file with s...

load images using jquery ajax in asp.net -

How do I find a good way to downgrade I have a file server where I store all the images. I need to display these images on my webpage using jquery and ajax. How to do any of the above mentioned files will return a byte array of the image using the image hosted on the file server on the file server on the file server, but once I read the byte array How do I use jquery and ajax to display it on a web page? Please Thank you Please see a HTTP handler Here is a HTTPHandler example: If you are using MVC then have a look:

php - mysql timestamp convertion -

What is the correct way to choose your own from the MySQL timestamp (YYYY-MM-DD HH: MM: SS) Something like the format, "5 August 2010"? How can I do mysql timestamp php date () compatible? There are two ways ... First of all, do it in PHP Can ... $ time = strtotime ('2010-05-05 05:05:05'); Echo date ('FJ, Y', $ time); Or, you can convert it to MySQL in Unix time: SELECT UNIX_TIMESTAMP (`your timestamp column ') blahblah ... . After you bring it, it will need to be formatted in date () . Or, you can do the whole thing right with MySQL: SELECT DATE_FORMAT (`your timestamp column ','% M% e,% Y ') FROM ...

ruby on rails - How to put capybara output html to a specific folder? -

When I use the "show me page" step, can I control it with capebara / cucumber? Where are the files output? I can not get the configuration for this, and my Google Fu is failing me. It seems that by default, they go to the root of my railroad folder and pull things up there. In fact, there is a config option that specifies where to output the files: Capibara.ave_to_and_open_page_path I believe it was added to the latest version (0.3.9) In your env.rb file you get some CAPABARA 2.10, CAPABAR: CAPABARA. Save_and_open_page_path = '/ user / jsblogger / my-rail-project / tmp' : Save_and_open_page = has been disapproved. Instead, call capibara :: save_path =

Perl: How to create objects on the fly? -

My goal is to be able to use the $ obj like this: Print $ obj- & gt; Hello () $ Obj- & gt; {Foo}; and I would like to make an object inline, possibly as this: my $ obj = (foo) = & gt ; 1, hello = & gt; Sub (return "world"}); But when I try to use $ obj as an object, I get an error saying that $ Obj is not blessed Can I use a certain base class (such as in PHP) to bless the hash so that I can use it as an object? For those people who know Javascript, I am trying to do the following, but in Perl: # Obj = {foo: 1, hello: function () {returning 'world'}} below # js code; Echo obj.hello () + obj.foo; Pearl will need some help in doing this. Since it does not consider stored code references in a hash as "methods". Methods are applied as entries in a package symbol table. Perl is more class-oriented than Javascript, which proudly declares that it is more of the object-oriented ( individual ) objects) To d...

java - What to do when Apache Tiles 2.1 does nothing when it has to? -

The reader (the girl) and the reader (boy), I have a filthy% * # Problems with Apache Tiles 2.1, I work with: Straits 2.1.8.1 Apache Tiles 2.1 Spring 3.0.3 My problem is this: Apache Tiles do not work on every JSP, it seems that & Lt; Tiles: InsertAttribute name = "body" /> This does not include any data when I see the resulting result, I can see: & Lt; / Div & gt; & Lt; / TD & gt; & Lt; / Sec: to authorize & gt; & Lt; TD & gt; & Lt; Div id = "targetSynthese" & gt; & Lt; Div id = "ariane" & gt; Tiles: insertDefinition name = "ariane" ignore = "false" /> & Lt; / Div & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; Td class = "AutoHyot error message" & gt; & Lt; Tiles: insertDefinition name = "error" /> gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> & Lt;...

openid - What are the pros and cons of a default URL with www or without www? -

We have to define the URL on the unique name. If it is www then there is no prefix or vice versa, so the decision to make is either stick with www or there is no prefix. No prefix cookie has been set for all subdomains. What are the other downsides for this? Or profit? Basically we need this for OpenID because OpenID will make users different if they come from www or there are no prefixes. As our site is new we can go either with one, besides, there is no worry about how the domain name looks. By using subdomain no www As mentioned here, you may have to suffer a performance hit while delivering static content: As I understand, if you think of http://example.com/ and for static content, the main domain that you set up will be passed along with the request for your static subdomain. This stable content can be easily avoided by buying a separate domain. However, this can certainly be dealt with using a www subdomain. Again, this is a very small thing, and act...

xml - WPF, display attribute value in TreeView instead of node name -

If I have the following data template for TreeView , then what do I need to change each Returns the value of the name attribute on each XML node instead of the TreeViewItem node name? & lt; HierarchicalDataTemplate x: key = "NodeTemplate" & gt; & Lt; TextBox x: name = "TB" /> & Lt; HierarchicalDataTemplate.ItemsSource & gt; & Lt; Binding XPath = "child :: node ()" /> & Lt; /HierarchicalDataTemplate.ItemsSource> & Lt; HierarchicalDataTemplate.Triggers & gt; & Lt; Datatrigger binding = "{binding path = node type}" value = "text" & gt; & Lt; Setter target name = "TB" property = "text" value = "{binding path = value}" /> & Lt; / DataTrigger & gt; & Lt; Data Trigger Binding = "{Binding Path = Node Type}" Value = "Element" & gt; & Lt; Setter target name = "TB" property = "text" value...

svn - sliksvn first commit slow second fast -

I have created a program that should be committed to the repository. I'm using Slim SN It seems that the first time committed (never before) after the program started I am very slow (20 seconds), but every second is very fast like 1 second. Can I make a type of connection from Skyscnn when I load my program to avoid this 20 second commit? Please tell me which additional information you want to thank The first commitment has to copy all the files . After this it is necessary to make a copy of the changes. In addition to the fast link - or somehow some other quick methods (snakernet) send initial copies you can not do this.

PHP mySql Actionscript ' " -

I am trying to insert two words through PHP with Flash interface in my SQL database. Since the words are in foreign language some letters are typed as 'and'. When I try to insert these letters, I get an error from my SQL / php. If the letter (symbol) described above in MySQL, then what should I do (Acrosscript, PHP, MySQL). There is varChar in the data type in my SQL ' with \' and " Change and / code> with \ "

Querying Oracle DB from Revolution R using RODBC -

Revolution R 64 on connected to winxp64 bit oracle using a 64 bit ODBC driver via a DSN Bit RODBC error library (RODBC) database & lt; - (c_RODBCFetchRows, attr (channel, or 'c'), in the call ("oraclemiso", uid = "epicedf", public construction department = "...") ("count select (*)" db from FTRAuction) Negative length vectors are not allowed But when I connect to the stuff, I'm also doing a problem to get an error, "handle_ptr"), Max, buffsize, Works Library (RODBC) channel & lt; - odbcConnect ("OraLSH", & lt; user & gt;, & lt; password & gt;)) odbcQuery , "Choose sysdate from double") sqlGetResults (channel , As.is = FALSE, errors = FALSE, max = 1, buffsize = 1, nullstring = NA, na.strings = "NA", trustNRows = true, December = getOption ("Dec") SYSDATE 1 2010- 01- 24 15:10:02 But if I do not know the rows (max = 1) before hand thanks, Arun ...

java - Reading files remotely -

Is it possible to read files from remote computers from Java and how? Yes you can read using FTP, NFS, HTTP, Windows shares and more. The exact way to do this is to use which protocol you want to use.

.valid() only validates first input with jQuery Validation plugin -

I'm having difficulty getting the jQuery validation plugin to work as necessary. Please take me with me because I I'm not a Juke specialist :) I have a form with all the necessary input, the rule is as shown below: $ ("# MakeEvent"). Validate ({onfocusout: false, rule: {name: {required: true, minlanta: 2, max length: 100}, host: {required: true, minaltata: 2, maximum length: 100}, start date: {required : Required: incorrect, url: true}, email: true, date: right}, end date: {required: true, date: true}, desc: {required: right, minlanta: 10, max length: 255} , Webpage: {required: truth, email: true},}}); Now I have a custom. Click () to call where I want to validate the form and then show a preview before allowing the user to send the form. Please see the functions given below: $ ('# submitPreview'). Valid () === incorrect) (if validity fails) and if ($ ("$ makeEvent"). Valid () = (if ($ ("$ makeEvent"). == true) {// Show the p...

javascript - jQuerys $.data() vs. DOM Object property -

Recently I need to add some data to the dynamically created LI element . In my first example, I used the .data () such as var _newli = $ (' foobar & lt; / li & gt; '); _newli.data ('base', 'ball'); // add _newli to a `ul` . It was slow too low . This logic is in a loop that can easily extend to 500+ items, it took ages! Sometimes it breaks the JavaScript execution time frame too. That's why I $ Data changed to . Either way, attaching the data to that object is doing more than 8x with the .data () method call. So it looks like var _newli = $ (' foobar & lt; / li & gt;'); $ .data (_newli [0], 'base', 'ball'); // Enclose in one `ul` / is really fast, but still it seemed like 3-4 seconds (!) To make all of my elements ( In my actual code there are $ 6 calls like $ per data). So I was really stuck with that, I asked why to use heck .data () or $. Data () anyway? I could attach my data to D...

sql - SELECT IN for a large set -

In my web application, I want to know which of the user's users on Twitter are already on the system. .. What I am currently doing is acquiring the list of Twitter IDs, which is following the user (Twitter API returns ID 5000 at one time), and is doing it: Select from user where user ID (COMMA_SEPARATED_LIST_OF_ID); I do not feel comfortable about this question because as the user grows the table, this bottle can be a neck. I do not want to optimize prematurely, so is there any other way I should do this? Update: I am using MySQL. two approaches: SELECT IN (Expr) can be a SELECT expression for expr i.e. The database can handle large amounts of data here. Use any included.

jQuery UI Button loses CSS Styling when called using $.get() and .html() -

I have some jQuery scripts using a jQuery UI button: & Lt; Script type = "text / javascript" & gt; $ ('Button) .button (); // Set jQuery UI button style $ ('# btnclose'). Live ('click', function () $ $ .get ('content.html', function (data) {$ ('# EditCategory') .html (data);});}); & Lt; / Script & gt; & Lt; Html & gt; & Lt; Button type = "button" id = "btnclose '" & gt; Close & lt; / Button & gt; & Lt; Div id = "editcategory" category = "range" & gt; & Lt; / Div & gt; & Lt; / Html & gt; I have content.html page: & lt; Button type = "button" id = "btnNewCategory" & gt; Add new category & lt; / Button & gt; When I click on #btnClose, content.html is returned and the button is displayed, but the jquery ui css styling is lost. Is it because COS style is implemented before the reconstruct...

flash - Search function -

I am trying to create a YouTube search API to create a Flash website on my site. I want users to find videos from type keywords and YouTube and play it. I've seen the tube lock / AS3 wrapper I'm not sure if they are old libraries are they still good to use? Can anyone provide related resources or articles here? Thank you .... section of "tells how to get a feed of everyone Special category or which are related to a particular keyword " .

iphone - iPad app orientation -

I have recently submitted my app for the iPad, and do not support all four orientation types to reject it Was done. Now I have set it up so that it rotates in front of free land and does not rotate again. Post text "itemprop =" text "I do not want to create new xibs, > You should be able to use an xib if you have the autorozes masks properly set up, and you set the appropriate key in the Info.plist file: & lt ; Keys; UISupportedInterfaceOrientations ~ ipad & lt; / key & gt; & lt; array & gt; & lt; string & gt; UIInterfaceOrientationPortrait & Lt; / string & gt; & lt; string & gt; UIInterfaceOrientationPortraitUpsideDown & lt; / string & gt; & lt; string & gt; UIInterfaceOrientationLandscapeLeft & lt; / string & gt; & lt; string & gt; UIInterfaceOrientationLandscapeRight & lt; / String & gt;

c++ - Initializing static pointer in templated class -

ऐसा वर्ग की तरह विचार करें: टेम्पलेट & lt; वर्ग टी & gt; वर्ग MyClass {निजी: स्थिर टी स्थिर ऑब्जेक्ट; स्थिर टी * स्थिर पॉइंटर ऑब्जेक्ट; }; ... टेम्पलेट & lt; वर्ग टी & gt; टी माइक्लास & lt; T & gt; :: स्थिर ऑब्जेक्ट; // & lt; - काम करता है ... टेम्पलेट & lt; वर्ग टी & gt; T * MyClass & lt; T & gt;: staticPointerObject = NULL; // & lt; - प्रतीक staticPointerObject नहीं ढूँढ सकता मुझे यह पता चलने में परेशानी हो रही है कि मैं उस पॉइन्टर ऑब्जेक्ट को सफलतापूर्वक क्यों नहीं बना सकता। उपरोक्त कोड हैडर में सभी निर्दिष्ट है, और मैंने जो मुद्दा लिखा है वह लिंक चरण में त्रुटि है, इसलिए इसे विशिष्ट प्रतीक नहीं मिल रहा है। "प्रतीक staticPointerObject नहीं मिल सकता है" - यह एक लिंकर त्रुटि संदेश जैसा दिखता है क्या यह? (इस तरह के विवरणों को आपके प्रश्न में निर्दिष्ट किया जाना है)। यदि ऐसा है, तो यह सबसे अधिक संभावना है क्योंकि आप अपने स्थिर सदस्य (ओं) की परिभाषा को कार्यान्वयन में डालते हैं फ़ाइल (एक। सीपीपी फ़ाइल) इसके ...

makefile - Why can I use some environment variables in some of the elements in the csproj file but not others in msbuild? -

What are the reasons for the following strange behavior, and how do I track issues? We use a combination of files and a combination of msbild. I have a project that has a strong name. I used to first use this kind of project file in S.N.K. Was founded by: & lt; AssemblyOnGreenTareIfile & gt; $ (Environmental) TheKeyName.snk & lt; / AssemblyOngeneratorfile & gt; The environment variable was defined in the batch file, which launched the shell for such a build: set environmentally = 'sappath' And it worked fine. Now I need a string name to be able to change, so it can be different on dev machine and release build server. There is a variable that exists to hold the full name key file to catch the full path, which is called a string named Strongam, it is defined in the msbuild environment, and if I put some text output into the target or property files, that the msbild function As part of that which builds the project, I can see that this Strongma...

c# - Bolding TreeNode Text in Web Control -

I have a web application with a TreeView / TreeNode, I want it because when I select a topic It makes the text bold, I can set an on-select node-changed event on the ASPX page and change the text to bold. But I need to do node set with javascript in Navigate mode instead of selection mode. I am trying to do this via callback to the Javascript server, to the callback to the value node of the tree node. I try again and do this: Tree View Tree View = GetCurrentTreeView (); // Tree node node = Treeview to the current displaying tree view. Fund node (argument); // This gives the correct node node. Text = "& lt; b & gt;" + Node. Text + "& lt; / b & gt;"; // It appears as a change in debugger // it is not changed But bolding the text just seems to be neglected. It does not appear on the page, and if I click again then the bolding goes in the debugger. I know that bold tags work when I put it inside the onsized node-changed event handler. Wha...