Posts

Showing posts from August, 2015

asp.net mvc - View Models (ViewData), UserControls/Partials and Global variables - best practice? -

I'm trying to understand a good way of 'global' members (like current users, themes, etc.) All of my partial As well as in my thoughts. I do not have to be a logic that can return this data (like BL.CurrentUser) I think it should be a part of the model in my thoughts so I inherited these members from BaseViewData tried. In my controllers, in this way or some other (in a filter or base method in my BaseController), I make an example of an inheriting class and pass it as a visual data. Everything is perfect right up to this point, so my view data is available on the main view with base views. But what about partial? If I have a simple partial that needs to be displayed in a blog post, then it looks like this: <%> @ control language = "C # "AutoAventWireUp =" True "Inheritance =" Viewer Control "& Gt%; And in my opinion, this is a simple code for partially presenting (this is its model. Posts IEnumerable ): < / P>

.net - Check RabbitMQ queue size from client -

Does anyone know that there is no way to check the number of messages in the rabbit MQ que from the client application? I am using .NET Client Library. You can actually get it by the client. When the queue_declare operation is done, the subtitle consists of three toupals containing (& lt; queue name & gt;, & lt; message count & gt ;, & lt; consumer count & gt;) Gives . The Dormant argument for Queue_declare tells you whether the queue server exists without modifying the state or not. You can check the length of qe using the disable option from queue_declare . Not sure about .NET, but something like Python appears: names, jobs, consumers = chan.queue_declare (queue = queuename, passive = true)

javascript - Is there a way to detect a click anywhere on a page except for a certain region? -

This is my problem, I am preparing a website that lets you click on that list to select a specific item Using the OnClick attribute allows me to be able to deselect the item by clicking anywhere on the page. I changed my code to & lt; Body onClick = "unselected ()" & gt; , but again if I click anywhere on the page, it cancels my item (even when I click to choose it for the first time!). So is there a way to find out that the user has clicked somewhere else on my list in the list? Thank you very much. EDIT: I tried on Blur and with the handleClick mixed result when I click on the item that I want to choose, then select it and uncheck it immediately by selecting it. Onblur is not going to cut it because it is not a standard HTML input element. You want to see that this when the onclick event is called. If this refers to an item in your list, you can select the item in the list. If it is referenced outside of the list, deselect all items in your list.

jquery post to php call back problem -

This is killing with jQuery When I click the user on the dib layer, I am trying to show a set of results of DB, the function reaches, but the results of the PHP file in the DP results will not return. any idea? & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# clickme'). Click (function () {// alert ('clicked'); $ .get ("doquery.php", {id: 1, Action: all}, function (result) {$ ("# result"). Html (results);});});}); & Lt; / Script & gt; & Lt; Div id = "clickme" & gt; Show results & lt; / Div & gt; & Lt; Div id = "result" & gt; & Lt; / Div & gt; I suspect that the PHP page returns an error of some type $ . The callback of is successfully executed ("200 OK"). To execute callback on all types of HTTP response status values, enter the code> $ Ajax () .

notepad++ - Regex to change to sentence case -

I am using Notepad ++ for some text replacement in the 5453-line language file. The format of the file's rows is: variable.name = Variable value here, it is certain, indeed Double apostost is deliberately. I need to change the value in terms of sentence, except "here" and "really" words that are appropriate and should be capitalized. As you can see, the case usually starts within the price. I have worked on it for a while. I have yet to get: (.) ([AZ]) (. +) . The replacement piece is where I am struggling. The function on resuscitation replacement matches (such as capitalization) can not be executed. You have a script, for example in PHP or Javascript Perhaps another editor lets you do this, I have not seen this feature yet. Update: View Jonas' answer. I have made myself a web Go to "Find, regexp & replace" (or press Ctrl ) + Shift + F ) Enter your regex (my ^ (. *? \ = \ S * \ w will be) Check the &qu

asp.net - How to create a database driven login system -

I want to create a website that the login system should not be controlled by cookies, but (a) table) in local (On server) SQL DB Is there any way to do this? There is even no partial way? Where else will I save instead of cookies ??? ASP.NET uses session cookies by default to track user requests if you If you use cookieles sessions, then you know that session ID has been added to all requests from the browser. In many scenarios, this can also be unacceptable. Even if you decide to hit and check the database for the "login in" flag on each request, you still have some ways to identify the incoming request It is necessary that a particular user may be in the form of encrypted values ​​in the hidden areas based on your security scenario, he said, it is not a better way of using cookies, because any Eta, which is likely to alter the division of customers. Personally, I think the cookies are great for tracking user requests, as long as you encrypt them properly.

html - How to implement a drag-and-drop div from scratch with JavaScript? -

This should be a combination of CSS and JavaScript. The steps to do this should be: Make it at the top of all other elements (Which property specity?) It is clicked Hold the event ( jQuery paths: View addons and. Hundreds of hours have been invested in the jQuery framework Complex tasks like this look C is trivial Chuck Norris' path: If you insist on trying to do it with java JavaScript, then we'll be programming programming for all rich cross-browser applications. Take advantage of the efforts of the jQuery team to make it easy. If you want to do some things, one programmatically sets all draggable items in a relative / full position. If you click on a particular item , It has a top / left value in the CSS to reflect changes made by the X, Y axis of the mouse until the click is released. Tutorial: Additionally, you want to update the z-index of each dragable when it is brought to view it. Tutorials:

c# - Programmatically sending "net send" -

I'm trying to find a method to not use System.Diagnostics.Process class but still send messages to other computers as if it is from net.exe , although it is not. If it matters, then I am an all-in-one frame for my workplace and one main structure / A major plus of the key features used in DLL is You can use win32 api for it. You can use it to call C #. Note msdn states: [This function is not supported as Windows Vista because Messenger service is not supported.]

user interface - Java GUI creation framework -

Do you know any decent profiles for making swing screens? Potential options: Netbeans platform with Matisse editor / li> Bean Builder (very old and unsupported) Eclipse VEP (beta) Any other option? Update: I'm not looking for the design time tool to make my screen. I have implemented implementers (users of my application) to create custom screens for different customers. ) I'm looking for an adder or a forum to allow. The screen must be saved in some format (called xml) and will be displayed by another (view-only) application. For this reason, solutions like Matisse4 MyEclipse are not fit, because I can not Update 2: I am asking for a framework, not the design-time tool. I want to embed some kind of component in my application so that users can create a screen by themselves. - a commercial product

java - Why do some languages need Boxing and Unboxing? -

This is not a question of boxing and unblocking, rather it is like why languages ​​like Java and C # is required? I am very familiar wtih C ++, STL and Boost. I can write it very easily in C ++, std :: vector & lt; Double & gt; Dummy; I have some experience with Java, but I was surprised because I had to write something like this, ArrayList < Double & gt; Dummy = New Arrestist & lt; Double & gt; (); My question, why should it be an object, while talking about generic, it is very difficult to include primitive types? In the case of Java, the reason for this is that in a generic way, Java is a compile-time move, which will give you the image Code> Aranyst & lt; String & gt; . However, Java's generics are implemented with type extinction: during normal run-time the information is lost, it was for compatibility reasons, because the generics were added for a long time in the life of Java, because of its Meaning, run-time, a

How to overcome <customErrors> error in a .NET remote hosting environment? -

I hope the people around here are facing this error and this is a simple fix, We are unable to see, and we do what we have done. Any thoughts, apparently, we can not see the error because of security, we are always able to setup internally, but we want to avoid any thoughts? Screenshot of the error below. One more thing, it is remote for the hosting environment development team. This is an error logging tool that captures unopposed exceptions and writes them in your database, it will also write the entire stack trace, it does not require any coding. And can be inserted into the running application. Here's your web. Some configurations are required in the config and some database tables (scripts are provided). In this way you can display custom, beautiful error pages, while still reaching your exception log.

java - Jboss 4.2 swallows the stacktrace on causes of EJB Exceptions, how can that be prevented? -

In JbS 4.2.2 (on JDK5), I'm not seeing this behavior. Is there a configuration or other way to stop it? If I have such a code: try {doSomething (); } Hold (exception e) {new EJBException (e); } As a result, the stack trace (when caught and logged in) will be: EJBException .... at (..... ( (.... due to: NullPointerException There is no stack trace for NullPointerException. Do stack trace to prevent swallowing and is actually part of full stack trace Because of this? This is an implementation decision, they do not set the root cause as the reason EjbException You can see this method. You can see the given exceptions (). There is a jere [1] about you (take a look at this as it has a painful solution), and you can see JBS AS implementation [2]. [1]: [2]:

objective c - Watching variables in Xcode -

I'm looking at a variable with Xcode. I am following the instructions by pausing on a breakpoint, selecting Run> Variables View> ... but with the exception of "Enable Data Formats", all the options have been deepened. idea? I am using Xcode version 3.1.3. I unfortunately, the clock pens created from the run menu are not available for me to work. Being aware of the thing is that when the scope of a variable is over, the clock's check may be invalid. If you do not believe in a bit more depth, then you can use the low level gdb for example to determine the status of a clock for memory address For, in the guide you've linked, they show how to view the variable path which is an indicator with the value 0xbfffeb70 . To manually set the location of a clock for that address, click on the debugger console (where debugging output is printed) after prompting "(gdb)" and type something like this: clock * (Int *) 0xbfffeb70) Secret synta

Doxygen - Objective-C - Document Private Class functions Private -

In Doksian, I can create Object-C categories in my implementation file to hide the interface which should not be publicly accessible. However, Doczene still documents the category as "public" members. Even by adding \ protected or \ private, this is still the case. Is there any other method that I am looking into in a "private methods" section of that class ... or even in the same document, the public class is listed as private only? Here is part of my config: # ------------------------- -------------------------------------------------- # Configuration options related to project # ------------------------------------------- - ------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = "My Project" PROJECT_NUMBER = OUTPUT_DIRECTORY = / User / User / D OUTPUT_LANGUAGE not / MyApplication / documentation CREATE_SUBDIRS = = English BRIEF_MEMBER_DESC = Yes REPEAT_BRIEF = Yes ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = not INLINE_INHERITED_MEMB

music - .NET Guitar Chord Library -

I'm wondering if anyone. NET library (ideal open source), which is related to guitar cord, is a set of chords or fret / string combinations, which can be respectively sequenced / string combinations or chords). I'm looking for some problems because "C #" is a note and a concept is "programming" as well. It seems that you are actually asking for a collection of digital guitar chords rather than a special The library I think if you search for a guitar wire database, you will find many downloadable programs that include a database but I am not yet available, chords of an independently available DB unfortunately Can not be involved . It may be that all the chairs are based on the breakdown of their names. In that case you want a library, or at least one formula instead of DB. But I do not believe this is the case. However there are some explanations of the nomenclature.

c++ - Compiler not flagging incorrect return value for HRESULT -

I'm just trying to diagnose the way for a very long time, code Why in the following snippet? ProcessAvent () Method False Values ​​I aInvokeEventHandler : HRESULT CEVET_Manager :: Process (event anEvent ) {Return (m_pPool-> GetFsm () -> Process Event (anEvent), Incorrect); } // Definition of Process () HRESULT Process (Const event and An Event, Bull an InvokeAventHandler = True); Whenever I broke into ProcessEvent () method, anInvokeEventHandler should always be true I have been passed in false . It took a work problem that I get to indicate that the incorrect value interiors returns the brackets on the line, like: return m_pPool-> GetFsm () - & gt; Process (one avenue, wrong); // Correct code As soon as I saw it, I fired myself. Obviously it was difficult to clarify because the original signer used the reddish outer bracket on the back line. My question is, the compiler chose this for me? My method is returning a HRESULT ,

Is the Map Rails Kit worth the money? -

Would you like to launch your own Google Maps mashup? Need to get data easily on the map, but do not want to lose the bad documents through the heap of Google Maps JavaScript code? The Map Rail Kit allows you to deploy a map mashup immediately, it concludes all Google Maps implementation details, making all customization easy to use config files, and map controls Rebuild bubbles and markers so your app can look unique. Make your map pop up with markers to work with some simple ActiveRecord models, so it's easy to start surprisingly, create markers records with titles, bubble content, and places. If you specify only one address for your markers, then your markers will be automatically geocode for you. You can easily add thousands of markers to your map, and they will dynamically load on the map only when they are currently viewing because your users navigate the map. All utilities in the kit include polish that your users will expect in commercial map mashups, their cur

css - Removing the textarea border in HTML -

I am working with the textarea element in HTML and want to remove the box's limit . I also want to align the text below my textarea . call it & lt; Head & gt; Add to : & lt; Style type = "text / css" & gt; Textrea {limit: none; } & Lt; / Style & gt; Or straighten to the lesson: & lt; Textarea style = "border: none" & gt; & Lt; / Textarea & gt;

c++ - Literate Coding Vs. std::pair, solutions? -

As most programmers try to adhere to the principles of praise and literacy programming, but in C ++, I regularly use From Std :: pair , for a gazillion common tasks but std :: pair , IMHO is a lowly enemy of literate programming ... My point is that when I return the code, I have written one or two days ago, and I have a std :: pair (Amatou Watch Jodtop of as) an iterator I "I wonder" what was> the first and second-means other ??? ". I think others have the same doubts given their code std :: pair , so I was thinking, Better resolution when using the best solution std :: pair ? struct MyPair: public std :: pair & gt; int, std :: string & gt; {intra & amp; keyInt () {back before;} zero keyIT (consultant and Amp; keyInt) {first = keyInt;} Const std :: string & valueString () {return second;} zero value string (const std :: string and Valuestring) {second = valueString;}}; This is a little verbose, although using it in your code can

.net - wsdl: type * not declared -

It seems that the custom defined type nested element does not work in Visual Studio 2008. I have the following wsdl file: & lt; Wsdl: Definitions xmlns: wsdl = "http://schemas.xmlsoap.org/wsdl/" xmlns: ns1 = "http: //org.apache.axis2/xsd" Xmlns: wsaw = "http: //www.w3 .org / 2006/05 / addressing / wsdl "xmlns: http =" http://schemas.xmlsoap.org/wsdl/http/ "xmlns: ns0 =" http: //processmaker.com "xmlns: xs =" http : //www.w3.org/2001/XMLSchema "xmlns: mime =" http://schemas.xmlsoap.org/wsdl/mime/ "xmlns: soap =" http://schemas.xmlsoap.org/wsdl/ Soap / "xmlns: SOAP 12 =" http://schemas.xmlsoap.org/wsdl/soap12/ "targetNamespace =" http://processmaker.com "& gt; & Lt; Wsdl: type & gt; & Lt; Xs: element name = "processListStruct" & gt; & Lt; Xs: complex type & gt; & Lt; Xs: sequence & gt; & Lt; Xs: element name = "guid" ty

.net - How do you change default stack size for managed executable.net -

We've found that throwing StackOverflowException on one of our auto-generated assemblies () is new. In this class (bear with me) please have 400+ simple properties which are in beginners (mostly default (string) etc.) in the manufacturer. We saw that it is fine on 64 bit, but it goes on 32 bits, bang! We need to test that if it is appropriate for our use case then we will have to provide room to breathe in order to make a big default stack, while we add the code generator again. . We will be interested in solutions involving app.config if possible, but I am a realistic person, so anything will be good. Due to the pile of flow again we have narrowed down the error to the creator in question. My first impression was also the type of infinite memories. However, we have reproduced the error using a 3-line console app that: creates an empty charge of the class. Calls a non-static method (clone) on the class, which is to prepare the first job and empty image is ready, pa

c - How to cross-compile 64bit DLL with VS 2005 on 32bit computer? -

Using Visual Studio 2005, I wrote a simple DL in C which uses the Windows API to send UDP datagrams and which is addicted to it. On a third-party program 64 bit machine, it does not work at all because in this case the third party code was compiled for 64 bit. So I need to ship two versions of the same DLL - for a 32 bit, for a 64 bit. However, I did not manage to run Visual Studio (running on 32 bit machines) to spit out a DLL which is not similar to the 32 bit version - It appears that in the project properties 'machine' The setting is only ignored by a colleague who has sent me VS Since 2008, it has simply refused to cross-compile in this scenario. Is this really not possible? Right-click on the project in Solution Explorer Properties / Configuration Manager / Active Solutions Platform: & / x64 / OK / close then select x64 in the platform, ok, and you want to proceed.

scroll - touchpad horizontal scrolling in emacs -

On Mac OS X, on Mac OS X, Most applications on app computers allow me to drag two-finger on the trackpad, both vertically and horizontally Allow to scroll through. I would like to use this capability to position the cursor in emacs. Adding the following lines to .emacs allows me to position the cursor: (global-set (wheel-up) 'backline) (global -Set-key [wheel-down] 'next-line) I do not know about a similar setting for the wheel - can anyone help left or right-wheel? (global-set-key (kbd "& lt; mouse-7 & gt; ") (Lambda () (interactive) (message" WEEEEL ")) This worked for me, try CHC and then that The way you want to see the event, then scroll the mouse. This will tell you in the echo area.

Design tips for StoreKit in iPhone OS 3.0? -

I am going to implement StoreKit in an iPhone application and want to know that there is any experience available already Can you say that any damage or trap in using StoreKit? I know the API is new - but there are some premium content in my app, which I want to ask users to pay, and this is an ideal way to do this - different payment on your membership Instead of giving directions to the website. I also assume how app is installed in the App Store in the App Store, to make it clear that the app is free to install - but you have to upgrade for some functionality Will happen. UPDATE (from comments): You can not convert a free app into a paid app - so the user has to first charge it for the store kit API additional software. 2 Update: Now you can use the API for free - Apple has recently changed the rules Oak application that uses the Store Kit API , On which I can model user interaction? Implement the storekit to think about things: When you restore the [code>

iphone - Can we change keyboards programmatically -

Can we change the program with the keyboard? Can we give user options to change the keyboard in a different language than the runtime? Are you No it is not possible - a user can only change their language in settings. However, if you choose, you can give the user an "English" keyboard (or they can ask for their preference) - you do this: UIKeyboardTypeASCIICapable

php - Why does the chart disappear when I copy the excel file? -

With PHPExcel 1.6.7, I tried cloning an Axel file, insert a word in the cell of sheet 1 of the new file and save it: $ file = "file.xls "; $ Fp = fopen ($ file, "r"); $ ObjReader = new PHPExcel_Reader_Excel5 (); $ Xls = $ objReader- & gt; Load ($ file); // $ xls- & gt; Set ActiveSet Index (0); $ Xls- & gt; GetSheetByName ('Sheet1') - & gt; Set cell value ('A2', 'BBB'); $ Newxls = Clone $ xls; $ Newfile = "newfile.xls"; $ Xlsfile = new PHPExcel_Writer_Excel5 ($ newxls); $ Xlsfile-> Save ($ newfile); The problem is: There should be a chart in Sheet 2, but this chart disappears in the new file (as I am only modifying sheet 1) Any PHP? Xpex does not currently support charts, if you open a document with the chart, the charts will not be saved. method for a workaround

iphone collision detection problem using chipmunk -

I have two minor problems: detect chimp collision: I am developing a game where I have a ball and some The stable polygon shape is working, but "partly", which means that it works for scenes of around 5 games (level 1 - 5, east.), But fails for 6th, and Then everything works fine on the 7th scene etc. Originally, the collision detection is working but fails many times .. I think there is no problem in setting up spaces, bodies etc. Because everything works well for a while and error only once "correct scene" for the first time I thought that the problem was not removing the shapes and bodies from space after a scene was over, but the bodies from space and The problem still continues after removing the figures. Cocos2d: For cocos2d, I have the impression that accelerometer activation fails multiple times. Has any of these problems come to you? Thank you Posts: 1 Join: Wed Jun 24, 2009 2:34 pm < P> Are you using only the chipmunk to detect conflict

c++ - Do you know which library Firefox 3 uses for the "download completed" info? -

यह विंडो है जो दिखाता है कि जब आप showAlertOnComplete = true सेट करते हैं। about: config Browser.download.manager.showAlertOnComplete = true मैं अपने अनुप्रयोगों में अधिसूचना संदेश जोड़ना चाहता हूं और मुझे उस कार्य के लिए एक अच्छी खुली स्रोत लाइब्रेरी ढूंढनी होगी। नोटिफिकेशन करने के कुछ तरीके हैं ओपन सोर्स लाइब्रेरी के संदर्भ में, सिस्टम-विस्तृत सूचना योजनाएं, जैसे कि (विंडोज), (मैक) या (लिनक्स) हैं। अगर आप केवल पहले से ही जो काम करते हैं मंच पर, कुछ संबंधित प्रश्न हैं ताकि सूचना के लिए विंडोज़ एपी के आसपास कुछ भी हो:

visual studio - Problem "F5" Debugging ASP.NET Web Application Project with VS2008 on Vista -

Greetings! I am working with Visual Studio 2008 .NET3.5 Web Application Project. On Vista Ultimate, I want to use IIS 7 as my local test web server compared to Cassini. I have a website set up in IE7 and everything is not a problem. However, instead of manually joining the process, the VS for F5 I want to use the debugger. So in my HOSTS file, I have: 127.0.0.1 mysite.com In the "Web" setting of my website project, I have Override application root url "" "Use local IIS web server" is selected Project URL " Li> In addition, in IIS, I have tied mysite.com up to 127.0.0.1 on port 80. In addition, the account used to run the IIS server is a member of the Administrators group and I run VS2008 as the administrator. / P> However, this error is triggered by debugging my project: Unable to start debugging on the web server. The IIS worker process for the initial URL is currently in progress. Any ideas why I work with IIS to

C# Reflection: How to get class reference from string? -

I want to do it in C #, but I do not know how: String with name -eg: FooClass and I want to apply a static method to this class: FooClass.MyMethod (); Obviously, I have to find references to class through reflection, but how? You would like to use the method. Here's a very simple example: using the system; Using the system. Class program {static zero main () {Type T = type. Gettype ("foo"); LegalInfo = T.Get Method ("Bar", Binding Flex. Static | BindingFlag.Public); Method. Invoke (empty, zero); }} Square fu {public static zero times () {Console.WriteLine ("bar"); }} I say simple because it is very easy to find a way that is internal to the same assembly. Please see more detailed information about what you will need to know about it. Once you retrieve your example, then shows you how to apply the method.

jQuery UI Resizable -

I'm looking at the jQuery UI Resizable method and I have a div (one near the other). I want to change the shape of one and change the other accordingly. A DIV grows and the other DIV gets smaller ... $ (document) .ready (function () {$ ("# right"). Resizable ({resize: 'Left' (, "#right",}); }); thanks, Max You want to tie in the "resize" event () $ ("# right"). Resizable ({resize : // is re-shaped to see the size of the UI element (// UI), and again resize the left}});

html - Go to specific line number on a page using # but not in url -

I have a record with hundreds of rows when a user clicks on the line, they go somewhere else and later Then the lines are redirected to the page. I want to start with the exact line clicked on the page. I // Some records are not set but there are no RS a name = "To & lt;% = line%> & gt; & Gt; // Rs. MOVENIC LINE = Line + 1 WAND When you enter '#' in the URL and a number goes to this line number. However, my problem is that the URL is off limits. I have a line number that is stored as a session variable, which happens after leaving the page in the beginning. How do I get a page to go from session to session number to go to session page? As far as I know, the anchor name is a feature of the browser. But maybe some JavaScript libraries who can scroll down to the anchor name without needing a URL. How to programmatically scroll the program. I think this also works, but I have not tested it window.location.hash = "#anchorname";

python - Formatting output when writing a list to textfile -

I have a list of lists that look like this: dupe = [ [95d1543adea47e88923c3d4ad56e9f65c2b40c76 ',' ron \\ c ',' apa.txt '], [' 95d1543adea47e88923c3d4ad56e9f65c2b40c76 ',' ron \\ c ',' knark.txt '], [' b5cc17d3a35877ca8b76f0b2e07497039c250696 ',' Ron \ 'a, Apa 2 .txt '], [' b5cc17d3a35877ca8b76f0b2e07497039c250696 ',' ron \\ a ',' jude.txt ']] I use this one very basic function () Write on file: Try : file_name = open ("dupe.txt", "W") except for IOError: passed for one in range (Lane (victim)): file_name .write (Cheat [a] [0] + "" + betrayal [a] [1] + "" + betrayal [a] [2] + "\ n"); File_name.close () The file is looking like this: 95d1543adea47e88923c3d4ad56e9f65c2b40c76 Ron \ c apa.txt 95d1543adea47e88923c3d4ad56e9f65c2b40c76 Ron \ c knark.txt B5cc17d3a35877ca8b76f0b2e374359c250696 However, how can I output to dupe.txt file to lo

compiler construction - Interpret something, and run the generated bytecode in Java? -

I am writing a toy interpreter with an RPL in Java I want to produce a bytecode from language and instead To explain the AST and to run it instead of walking. Since my Java is a bit wild, is it possible to run a generated bytecode JVM? You can use java.lang.Classloader.defineClass (), which is a bytecode Class objects You can call the resulting class object as the new instant (), and you get out of it.

java - How to relate ga:campaign and ga:pagePath (content) on Google Analytics Export API? -

Using custom reports, you can drill on a specific campaign and then select the landing page or content page, which Choose that individual visitor. When I try to recover the same information through the Google Analytics Export API, I get an error if I try to include those two dimensions in my feed. Is there any success story about combining this information together? I know that is possible, we do not know what is the correct combination. Since last week I had not made any progress on this issue, I thought about giving a little more information. I'm presenting a screen shot of a real report of Google Analytics UI Given below, which I am attempting to pull out and I am not getting any information originally landing the camping information group page by the page. So I know who clicked on my email and how the person landed. I just got other people with the same question. I have used it with some GA data only. It seems like you can include it in the metric, but it has bee

ruby on rails - How can I define multiple associated objects using Factory Girl? -

Offer this syntax to make factory girl docs parents-child associations (I think) ... Factory Define: Posting | P | P. Authors (| one | A.association (: user)} end A post belongs to a user (its "author"). What if you Want to define a factory to create a user s, which contains a group of posts s? Or, many-to-many positions (For example, see update below)? UPDATE I thought I thought it. I tried it ... < Code> factory.define (: user) do | f | f.username {factory.neck (User name)} # ... f.roles {| user | [factory (: role), factory (: role, {: name = & gt; 'EDIT_STAFF_DATA'})}} This worked for the first time, but then I found verification errors because the FG was trying to save the user twice with the same username and email. Then I asked my basic question But if you have multiple relationships, like like user and roles , you A Fakti how something that can define user will return relevant roles ? Note that roles should be uni

How can I copy an item from references to disk? (c#) -

For example, I have a flash movie in my reference, how can I copy it to a place outside the application? Assuming you have an embedded resource, you want to do something like this: {Reset input = assembly. GetManifestResourceStream (resource)) {If (input = = faucet) {new argument expression ("Resource name not found") "); } (Stream output = file by using the create (file)) {byte [buffer = new byte] [8 * 1024]; Read int; While (read (= input .reed (buffer, 0, buffer length)) gt; 0) {output.Write (buffer, 0, reading); }}}} Call it at: WriteResourceToDisk (typeof (SomeKnownType). Assembly, "Foo.Bar.FlashFile.swf" "File .swf"); (Where Foo.Bar.FlashFile.swf is the path to the resource.)

iPhone SDK Push Notification -

I have setup push notifications in apple developer panel and added code on my application. Using a development profile works fine on the phone, but if I use a distribution (ad-hoc) profile then I can give it to some users to test one Error and crash, the log returns the following error code: Thursday June 25 22:22:35 Unknown flagship [729] s & lt; Alert & gt;: *** in the assertion failure - [SBRemoteNotificationServer registerApplication: forEnvironment: withTypes:], /SourceCache/SpringBoard/SpringBoard-919.5/SBRemoteNotificationServer.m:633 Thu Jun 25 22:22:35 unknown springboard [729] & Lt; Error & gt;: *** not come exception 'NSInternalInconsistencyException', because due to the completion of the application: "no connection [[UIApplication sharedApplication] registerForRemoteNotificationTy: production environment" I found the following code using code app Pes: (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRem

Unable to replace a space with a new line in Vim -

मुझे पता है। मैं चला :% s / / एस / \ n / g मुझे मिलता है E488: अनुरेखक वर्ण 2 उदाहरण मैं चला :% s / / \ n / g मुझे मिलता है text ^ @ text मैं निम्नलिखित सेटिंग्स separetaly के साथ ही कोड चलाता है सेट fileformat = unix और सेट फ़ाइल स्वरूप = डॉस आप विम में एक नई लाइन के साथ कैसे प्रतिस्थापित कर सकते हैं? :% s / / Ctrl v वापसी / g जहां Ctrl v नियंत्रण-कुंजी प्लस कुंजी v और वापसी वापसी कुंजी है (मुख्य कुंजीपटल पर एक है, नमपैड पर कुंजी दर्ज नहीं करें) अन्य वर्ण सामान्य रूप में टाइप किए जाते हैं। यदि यह सही ढंग से दर्ज किया गया है, तो क्रम Ctrl v वापसी को अक्षर ^ M , आमतौर पर एक अलग रंग में, यह इंगित करने के लिए कि वे विशेष हैं नोट करें कि वास्तव में टाइपिंग ^ M नहीं काम करेगा। यह भी ध्यान रखें कि विम के लिए खिड़कियों के लिए, यह नियंत्रण- v के बजाय नियंत्रण- q (जैसा कि यह पेस्ट होता है)। Ctrl-V भी कुंजीपटल के माध्यम से अन्य "विशेष" कुंजी को दर्ज करने की अनुमति देता है। यह उदाहरण के लिए भी उपयोगी है टै

compression - Compressing a directory of files with PHP -

I am creating a PHP backup script which will dump everything from a database and save it in the file. I have been successful in doing this but now I have to take hundreds of images in a directory and have to be included in a simple .tar.gz file. What is the best way to do this and how is it done? I have no idea where to start. If you are using PHP 5.2 or later, Then you use and then do something on the lines of this: $ images_dir = '/ path / to / images'; // This folder should be able to write by server $ backup = '/ path / to / backup'; $ Zip_file = $ backup '/ Backup.zip'; If ($ handle = opendir ($ images_dir)) {$ zip = new ziparchive (); If ($ zip-> open ($ zip_file, ZIPARCHIVE :: CREATE)! == TRUE) {exit ("can not open & lt; $ zip_file»; \ n "); } While (wrong! == ($ file = readdir ($ handle))) {$ zip- & gt; AddFile ($ images_dir. '/'. $ File); Echo "$ file \ n"; } Close ($ handle); Echo "numfiles:

sql - Index for multiple columns in ActiveRecord -

There are two ways to declare an index for multiple columns in the Active record: add_index: classification, [: Species: family: trivial_names] add_index: taxonomy, species add_index: taxonomy, family add_index: taxonomy,: trivial_names what is the first approach and second? If so, when should I first use and second when? You are comparing a composite index to a set of independent index they are just different. Think about it: A complex index lets you quickly see the first field in the nested set of the area, after which the second field looks fast the first field already by Within the selected records only, after the fast field view of the third field - then, only within the records selected by the previous two indexes We take an example. If your database engine does not take more than 20 steps to detect a unique value within 1,000,000 records (if memory works), then if is using any index, it is true that Whether or not you are using a composite or independent i

C# string handling how get path and args from a string -

I have a string with quotation marks around the path: "C: \ Program Files (X86) \ Windows Media Player \ wmplayer.exe "arg1 arg2 If I use Text.Split (new four [] {''}, 2); Try splitting on two quotes (text split (new four [] {/ code> string [] Path and arrags = text Sample (new four [] {'/' '}, 3); String [] args = pathAndArgs [2] .plate (new four [] {''}, 2); I may have a syntax error, but what do you mean to me.

c# - Determine Solutions Configuration (Visual Studio) -

Is there a way to determine whether you're running in "security configuration", in the code? For example, 'debug' vs 'release?' I have a service that I would like to check in the IDE in DDB, now I have the balls I set which set the 'service' on the set to correct (which again ' My 'uses the OnStart method to run the main method), if it is set to false, then I run the' main 'method. It works very well, but I often try to reset the bool I forget and then when I serve So micro go to set it fail and I want to go back, bool reset, re-compiled and more. If I can determine now that I was running programmatic debug in IDE, then I could get this issue. Edit: While thinking about this, I think what I should do in the end determine whether I am in the 'game' in the id and do not configure the spirits This will allow me to compile it in debug or other configurations. Simple Solutions' System Diagnostics. Debugger ISHAT

string - Replace text, Jython, Regex -

I am processing my website and want to change some things on pages. I want to replace the following string: in & lt; SPAN class = "bold" & gt; And ... & lt; / SPAN & gt; Your right column & lt; Span & gt; not tags: more in ... column right. I would like to replace it with "down" I tried to do this with a simple substitute () in Python, but because in some time the text & lt; Span & gt; tag and does not seem to work on multiple lines. My only idea is to use regular expressions, but I am not with the speed of reggae, can anyone lend a hand? IF Assume that the string " Foo "has html text, so to do this will be the code in Python: import re # is used to create the dot.DOTALL Match all the characters with the new characters newx Regexp = re.compile ('.more \. \. *. *? Column to your right'. ', Re.Dotal) re.sub (regexp,' below ', foo)

design patterns - Javascript functions -

We are only trying to provide some special functions to run on the basis of the request's address. I was wondering how we could do this: if (condition1) {$ (document) .ready (function () {... .. // function1 condition1}}; } Else if (condition2) {$ (document) .ready (function () {... ... // function of condition2}}); And if ... I was wondering what would a good pattern work for it? Since we have all our functions in a file. It depends on your terms .. If they are all similar formats, then you have something similar to array = [["page 1", page 1func], ["page 2", page 2func] Can, ...] for (i = 0; i

C# / Access Getting Primary Keys from Access 2003 -

I am using ODDI to interact with an access database, and I use the primary key for each table, but In such a way that they are connected to tables In other words, I just do not want to have a flat list of primary key column names - I want to be able to determine which table they belong to. Any ideas how to do that? I used the GetSchema () method to obtain the table of tables, but the information in that table does not include the primary key (or any other index, for that matter). OK - Better comprehension of column names being slightly outputed and how schema related to tables Ho. To do this, pass the string "indexes" to GetSchema () method in the table of each record in the index table and whether both the index is the primary key or not.

sql - MySQL join based on regexp -

I have table product where is a related product from the column . Related products contain colored materials ID ( column productivity ) by colon, e.g. Abc-123: foo-prod: ada69, etc. Due to some poor design, there is a case that a product can be removed from the product table and the relevant products can still be referred to in the column. So I need a SQL query, which goes through all the rows in the table of products, explodes the data and checks the related product columns (hence the title is exploded) and it Observe whether each reference product exists in the same product table. However, I am a newbie on SQL and there is a problem writing the join / regexp query to do this. Any help would be appreciated! MySQL mail regexp , But unfortunately can not return the matching substrings. You better select from the product P zone product from FIXIN_SET (rel.id, repplace (p.related, ':', ',' '))

when will google wave step out of preview release? -

So that wave robots can be hosted with any web host. Note: For this developer preview release, all WAVE robots should be implemented as a Google App Engine application. Future releases will present the ability to host robots on any web host. It has been announced that the plan "Extending the Google Wave preview beyond the developers on September 30 " is.

c# - LINQ to SQL architecture. What is best? -

This question is like a pool, trying to identify the best architecture while using ORM like SQL from LINQ Are there. The drawings we are defining for are outlined, which refer to other applications directly or via webservice through DPLL. We have .NET apps and PHP applications. The possibilities are: Multiple data references: Separating databases into units of work and creating separate references for each one. Professionals: Easy to Use Classes will be divided into separate names Small domain to maintain Cons: If relevant, maintenance must be duplicated objects when creating hell Any other hits in the context of the data With the need of creating the object, the object can not be used in the context. Base Single Data Reference: All tables, ideas, processes, live in the same huge context. Professionals: No Repetition Managing relationships is easy, by default LINQ takes care of it. Better performance on DB, less hits. All tables are in the same

c# - General Exception Handling Strategy for .NET -

I am used to try / hold blocks in each method. The reason for this is that I can log on and catch every exception at the point of exclusion. I think, with my reading and conversation with others, this is not a popular scene. One should catch the one who is ready to handle someone, however, if I do not catch the issue of obstruction, then it is possible to never enter that barrier and find out about it. Note: When I catch and do not handle, I still throw it, it allows me to induce an exception to do something which will handle it, still I still have permission to login at the point of its violation gives. So ... how to avoid / try to catch in every method still log on the error on which this happened? No, do not hold everything Exceptions promote higher on the stack. You just have to make sure that the exception is caught before moving on the stack. This means, for example, you may have an attempt to hold an event handler / hold block an event handler, "top of the stac

.net - To "this" or not to "this" in C#? -

संभावित डुप्लिकेट: मेरे पास इस कीवर्ड से संबंधित एक शैली प्रश्न है। क्या आप इस का उपयोग करते हैं, जब स्पष्टता के लिए एक आत्म-कार्यान्वयन गुण या क्लास के भीतर विधियों को संदर्भित करते हैं? एक उदाहरण के लिए, आपके कन्स्ट्रक्टर में, क्या आप अपना पैरामीटर लिखते हैं के रूप में असाइनमेंट: सार्वजनिक वर्ग फ़ू {सार्वजनिक स्ट्रिंग FooProperty {get; सेट; } सार्वजनिक फू (स्ट्रिंग फूप्रॉपर्टी) {this.FooProperty = fooProperty; } ...} या: सार्वजनिक वर्ग फ़ू {सार्वजनिक स्ट्रिंग FooProperty {get; सेट; } सार्वजनिक फू (स्ट्रिंग फूप्रॉपर्टी) {FooProperty = fooProperty; } ...} आईएमएचओ, यह एक बहुत ही उपयोगी कीवर्ड है। एक बार जब मैं "यह" देखता हूं, मुझे पता है कि यह एक क्लास चर है अन्यथा, मुझे यह जांचना होगा कि इसकी एक पैरामीटर, विधि के भीतर घोषित एक चर। "यह" समय बचाता है :) (अस्पष्ट मजाक हेह)

c# - How to convert WPF MouseDevice.GetPosition(null) to screen coordinates? -

How you can change System.Windows.Point, which is returned by mouse device. Gateptation (empty), which is a WPF window in screen coordinates. This hack is ( ) but it is almost two years old and will only work under certain restrictions. As stated in the article that it is not trivial to be correct, it is possible that I would like to trust the WPF method. I am using .NET Framework 4.0, so I'm not worried about the previous compatibility .NET Framework Version. You need it: It's called on a control and passes it (0, 0), so it gives you the top-left corner of the control in the screen coordinates. Or you can pass it (real-life, realhite) and you will find the bottom right corner.

How do I set up TFS PowerShell Snapin -

I have installed TFS Power Tools and I'm trying to use PowerShell Snapin, but I do not determine I can see how to set it up when I look in the install folder, I only see the following 5 dls Maikrosoftktekmfoundeshnkpovertoiskclaintkdl Maikrosoftktekmfoundeshnkpovertoiskcomnkdl Maikrosoftktekmfoundeshnkpovertois Kantrolskdl Maikrosoftkvisualsatudioktekmfoundeshnkpovertoiskcomnkdl Maikrosoftkvisualsatudio .TeamFoundation.PowerToys.dll I used Instalutil to install each one, and then I used Generation ps code to see where CMDlets are installed, I Can add snapin, but it seems that handles present only in those DLSs are present and these commands are not yet useful for me Are you PS H: \ & gt; Get-pssnapin -registered name: TfsBPAPowerShellSnapIn PSVersion: 1.0 Description: This is a PowerShell snap-in which Team Foundation Server cmdlets PS H: \ & gt; Get-command -pssnapin TfsBPAPowerShellSnapIn CommandType Name Definition ----------- ---- ---------- Simdilet go MsiPro

xaml - Tile Images in Silverlight Controls -

WARNING: Silverlight / WPF n00b I'm just looking at the Silverlight it just became clear That brush, unlike the WPF, is not tile-able in Silverlight. I want to do a graphic tile in a grid control. Whether the image is basically a tile enabled per grid cell, what could be the use of many brushes per control, or should I use a lot of image control, or? Thanks in advance. View this link ...

visual studio - VS 2008 C++ how to make a project without .net dependency -

I am writing a plain vanilla c ++ console app using VS 2008. When I make the project, IDE likes me pure version. There is no alternative to 'none' when I look at the project property page, whatever I have selected in the targeted framework and which is in depth. When I try to run an app on a window machine without CRR, it gives me a setup error and gets out. There is nothing in my code that has nothing to do with .NET. How can I save from the clutches of NET and CLR? Make sure that you have chosen "Win32" Console Application "Project Type This is a C ++ only Most of the other console options will tie the project in .nind.

osx - List potential applications that could open a file -

Is it possible for a user to get a list of applications installed on the computer that can be used to open a file ( An image in my case), similar to the list shown by Finder's "Open with ..." menu? Are you looking for a program or scripting solution? Programmatic, (see LSCopyAllRoleHandlersForContentType () for example). For scripting, you might want to lsregister , which is / system / library / framwork / coir services. Framework Version / A / Fram Works / Launch Services / Framework Work / Support Do not fool your location in the dock. It's in carbon docs, but it's really core services, which Do not like it.

django - Why on earth do I have to pass RequestContext in all of my responses? -

I want to highlight the current page in the navigation menu. Obviously, I need to give the link to a class like 'active' when you are on their page. This is a classic problem and I have seen many solutions. My problem is that I hate them all and none of them think of being very dry. For example: @ register.simple_tag def active (request, pattern): import re if re.search (pattern, request.path): return 'active' return '' --- - {% load tag%} & lt; Div id = "navigation" & gt; & Lt; A class = "{% active request" ^ / about / "%}" href = "/ about /" & gt; About & lt; / A & gt; & Lt; A class = "{% active request" ^ / contact / "%}" href = "/ contact /" & gt; Contact & lt; / A & gt; & Lt; A class = "{% active request" ^ / services / "%}" href = "/ services /" & gt; Service & lt; / A & gt; & Lt; / Div &

actionscript 3 - Margintop in actionscript3 -

Hello, is it possible to set up a form element for a form element in the action sequence? var frm: Form = new form (); Thank you You almost did it. Instead of margin hat you need to set up paddingop . var frm: form = new form (); Frm.setStyle ('paddingtop', 20);

Testing for ImportErrors in Python -

We are making real problems with those people who are checking in code that does not work because something is re- Of course, this is partly because our developers do not really have any good tools to easily find these types of mistakes. Is there any device to help you find imported errors in Python? Of course, the correct answer is here "You should use your unit test for this." But, I'm in heritage code land (at least according to the definition of Michael Wing), so our unit tests are doing a great job on us. In the meantime, the tool must walk through each directory and import each file, in which any scripts will be imported into imported eaters (such as file or class recently changed) Search for I think it would not be difficult to write to myself, but is there any such program that has already been written to do this? Pikeker imports this module for you and receives these errors. Oh, and "Pilint & lt; Modulamam" The module will import, but

.htaccess - Problems redirecting old domain to new with Apache and htaccess -

My homepage is located at www.nazgulled.net and I have purchased a new domain that is www.ricardoamaral.net. Both of these domains point to the same exact server. I'm getting two problems with redirection, my current code is: rewrite% {HTTP_HOST} ^ (Www ..)? Nazgulled \ .net [NC] RewriteRule ^ (. *) $ Http://www.ricardoamaral.net/$1 [L] For now I just Anyway ... P> 1) This work Not doing, when I try, I can not reach "nazgulled.net", it gives me a "server internal error" and I do not understand why .. I do not understand why Because "google.com" replaces "ricardoamaral.net", the redirect works fine: 2) I have some subdomains May include and I would like to redirect all of them. My first choice is to add different redlight conditions / rules to each sub-domain, but there are several manual codes in it and if the user types some subdomain that does not exist, then they do not redirect it and I Also want to For

c++ - Qt QSystemTrayIcon not sending activated signal -

I'm trying to copy the QT cysthere example here: Things work apart from it QSystemTrayIcon object is not sending active signal. Here's my main window. CPP code is: #include & lt; QtGui & gt; #include "mainwindow.h" #include "ui_mainwindow.h" Main Window :: Main Window (QWidget * Guardian): QMainWindow (Parent), UI (New UI :: MainWondo) {UI- & gt; SetupUi (this); Quimesbox :: Notifications (0, tr ("cystre"), tr ("loaded."); CreateTrayIcon (); Connect (Tray icon, Signal (active (QSystemTrayIcon :: ActivationReason)), this slot (iconActivated (QSystemTrayIcon :: ActivationReason))); TrayIcon-> Show (); } Zero MainWindow :: createTrayIcon () {trayIcon = New QSystemTrayIcon (this); } Zero MainWindow :: iconActivated (QSystemTrayIcon :: ActiveationReason Reason) {QMessageBox :: Notification (0, tr ("Systray"), tr ("test")); } Main Microsoft :: Messequite () {QMessageBox :: information (0, tr ("

visual studio 2010 beta 1 slow? on 64bits/windows7 -

My Vision Studio 10 Beta 4 GB and Dual Core are installed on Windows 7 64bit laptops. The development of the ASP.NET app on the page may be slow. After loading the first page, it can take an average of 3.5 seconds to load the following pages. It should not be XP, 32 Beats, 512 MB, the same webpack on a Core Visual Studio 9 is not enough for me for a long time. (Both PCs are Intel processors) I wanted to know that I should switch back to MSVS 9? If an option I could change in my project? Or OS to perform it better or if I can do anything. -Edit- MSVS 9 is fast but not so much I wonder why there is better specs when this PC is in good performance. You know that this is beta, is not it? They told you that they have not ended with it, are not they? More importantly, have you told it to Microsoft? It seems as if you want to fix it, and this is the way to decide.

flash - How to associate linked SWC MovieClip asset with a Class in FlexBuilder Actionscript project -

I am using maximum flex builder and trying to create huge applications with great assets in Flex Builder I am I know how to publish or export Flash Assets as SWC so that they are available in Flex Builder, but what if you have a movie clip with flash status in Flash, which is either published as SWC Is SEF exported or included, and then want to add a class file created in FlexBilder with this SWC asset? I want to avoid unnecessary roundtripping ... every time I need to edit in the Flash author's writer movieclip class, then I have to edit it and re-publish or reexport for an SWC So that it is available in Flex Builder. That is, when I write graphical properties in Flex, I want to do all my coding in FlexBilder. There are two ways to look at the first method (which I use a lot more often) than my flakes project I have to add FLA to my Lib folder, then I am setting the path for the ../src/ (Publish Settings -> Flash Tab -> Action Script 3 Button) in the Flash so tha

file - problems with shared project in netbeans -

I work with a student group on a project: In sharing our project We have some problems. There are 2 files that we need to modify every time: project.properties private.properties The problem is, That we use the library and these are the relative paths of our hard drive. So when we check out: We need to modify these files to get the project task: Example: C: \ User \ ** \ Desktop \ teddpee \ EgisPartnerprofile \ nbproject \ build-impl.xml: 519: Warning: Do not C: \ vol \ netbeans-6.1 \ 6.1 \ Enterprise5 \ Module \ ext \ jsf-1_2 \ jsf-impl.jar to copy. C: \ vol \ netbeans-6.1 \ 6.1 \ Enterprise 5 \ Module \ ext \ jsf-1_2 \ jsf-impl.jar is the path from any other .. How do I solve this problem I can do? There are two things that you can do. Set up a conference Who uses and sticks everyone on this project may be able to make you all the c: \ jars directory and keep all their normal jars there. Or can you learn Or Ivy and they can handle their dependencies for you.

Displaying PDFs on iPhone - CALayers? -

I'm having a big headache trying to figure out I have a page from a PDF file (only one) I am trying to display This PDF page is a map that has to zoom in and out with a pinch etc ... I'm doing it with CatLayer (each tile is 256x256 but can set it in a larger size). It works but in reality I slowly wanted to load all these tiles in one go. Is this possible? Dryconcontext: Every tile is said to be, but when I keep on spinning, but I have to wait for them, and I had a comfortable experience on the device. I have not really got it in the zooming part, but I'm afraid that this will require more work than I expected. Apart from this, is there no way that I can set the limit of superlarry when it should be reached manually to reach the boundary limit or manually on touch? Does anyone have to deal with this situation? I'm trying to customize the code from Bill Dudley here: But there is no luck at all. Any help and suggestions are highly appreciated. Thanks Did you

c# - How to programmatically set parameters for EntityDataSource and DetailsView? -

मैं स्टम्प्ड! प्रोग्राम के लिए एक पैरामीटर निर्धारित करने का सर्वोत्तम तरीका क्या है EntityDataSource नियंत्रण? विशेष रूप से, मैं PageViewer.ProviderUserKey का उपयोग करना चाहता हूं ताकि एक कस्टम यूज़र विवरण तालिका मेरे पास एक विवरणदृश्य के लिए हो। मैंने नियंत्रण से मूल्य खींचने के लिए asp: ControlParameter का उपयोग करते हुए कोड देखा है, लेकिन यह लगभग मेरी स्थिति के लिए हैक की तरह लगता है। मुझे पैरामीटर मान सेट करने के लिए अतिरिक्त नियंत्रण नहीं चाहिए। कोई भी विचार? अग्रिम धन्यवाद! यदि कोई कस्टम पैरामीटर प्रकार बनाना बहुत काम की तरह लगता है, तो आप प्रोग्रामेटिक रूप से एक जोड़ सकते हैं मूल पैरामीटर निम्नानुसार है: पैरामीटर पैरामीटर = नया पैरामीटर ("MyParam", TypeCode.String, Page.User.ProviderUserKey); MyDataSource.SelectParameters.Add (पैरामीटर); ऐसा कुछ आपको चाहिए कि आपको क्या चाहिए।

vb.net - Assign Variables from Split -

OK, so I have this string, it's "x / y" I assign to x for my own viable How can I use the split function and allocate my variable 2 to y MyVariable

c++ - What does it take to become a Java expert? -

I was just reading and wondering is it easy to become a Java expert with C ++? Is it because it is very easy to write the wrong code in C ++ while in Java do you have less flexibility (for example memory management), which prevents you from writing code horrors? Or is it because C ++ is simply naturally difficult to learn and master? Have you come across a study that separates and expresses CDAs in C ++ versus Java versus C #? What does it take? Like some, years of practice and countless mistakes. And yet, your expertise will be in those handful areas where you solve special problems domains repeatedly; Namely, the island of specializing in middleware and / or frameworks? Threading & amp; Concurrency? Perhaps swing / GUI Java applications? Or web application ... Java has become so big that nobody can be any expert in all Java - see how many packages have been added between 1.4 and 1.6 and it should be clear needed . Although you have people who come very close (Joshia

c# - Why are my application settings not getting persisted? -

So I have some settings that Users from within, but for some reason, they are not being saved .exe.config file I have the following: properties.Settings.Default.Email = "new@value.com"; Properties.Settings.Default.Save (); Yet I look at the setting file in the debug folder and it is still the default that I have set in Visual Studio. Am I doing this wrong? User Settings User-specific, so they could not be saved back .exe.config file To do that, the system is widened from Docs LocalSettingsProvider :. The application-scoped settings and default user-Scoded setting has been named in a file named application.exe.config, which was created as executable file in the same directory is. Application configuration settings are read-only stored under specific user data username.config stored in a file name, the user's home directory. Then a UserSettingsTest application for VS only under Debugger Run (so vshost bit) I ended up with a path: C: \ Users \

text editor - Using ICSharpCode.TextEditor on VB.NET -

I've integrated ICSharpCode.TextEditor in VB.NET and run smoothly without error. But, I also choose Intelisens with can not find properties in Properties window or syntax highlighting features. I have no experience with ICSE, please help me Thank you. Here is the code from your project // hm HighlightingManager Start Manager.AddSyntaxModeFileProvider (new FileSyntaxModeProvider (AppDomain.CurrentDomain.BaseDirectory)); // Set the current highlighter IHighlightingStrategy highlighter = HighlightingManager.Manager.FindHighlighter ( "SQL"); TxtQuery.Document.HighlightingStrategy = Highlighter; Make sure that the file exists in SQL.xshd AppDomain.CurrentDomain.BaseDirectory As for entellisense you mostly use this code it yourself must apply private void ShowCompletionWindow (ICompletionDataProvider completionDataProvider, char ch) {try {codeCompletionWindow = CodeCompletionWindow.ShowCompletionWindow (this, codeEditorControl, "& LT; code & gt;

Can I narrow down the type of classes retrieved by a Polymorphic relationship in Rails? -

I have a favored connection in the train, but in a special example of use, I want to get a record for only one class address & lt; ActiveRecord :: Base is_to: addressable ,: polymorphic = & gt; True end class person & lt; ActiveRecord :: Base has_many: Addresses ,: as in => : Addressable and Class Company & lt; ActiveRecord :: Base has_many: Addresses ,: as in => : Addressed End & gt; & Gt; C = Company.create (: name => "WidgetCo") & gt; & Gt; P = person.create (: name = & gt; "John Smith") & gt; & Gt; A1 = Address.create (: Street => "123 Foo ST",: city => "Barville",: state_code = & gt; "MT" ,: zip_code = & gt; "12345", addressable = & Gt; p)> & gt; & Gt; A2 = Address.create (: Road => "321 RD Contact" ,: City = & gt; "Buzzberg",: Statecode => "MT" ,: zip_code = & gt; "54321" ,: Add

c# - What am I doing wrong this time with Moq? -

I'm having trouble with smiles and I'm not sure what I did wrong at the moment. Although the debugger is going through step by step and I set it in my counterfeit ResetPassword "O do not seem to do this to return < P> My unit is part of the test: var membership mock = new fake & lt; subscription provider & gt; (); var user = new fake & lt; membership user & gt; () ; User.SetupGet (x = & gt; x.email). Return ("Email" Return ("O"); Subscription Mark. Setup (m => m.getUser ("chobo2", false)) User (Reset) (user) Authentication authentication provider = membership Mock.Object; // Act var real = authentication. Password recovery phase 2 ("chobo2", "2z"); My Code membership user name = provider.Getuser (user, incorrect); string newPassword = userN ame.ResetPassword (securityAnswer); Mail.To = userName.Email; The provider is such a property that is set up with the counterfeit object