Friday, 15 March 2013

javascript - Knockout JS Validation to existing view model -


यह मेरा वर्तमान कोड असम्बद्ध है:

मैं वर्तमान में दोनों & amp;

मैंने दोनों दस्तावेज के माध्यम से पढ़ा है और उन्हें अपनी मौजूदा स्क्रिप्ट पर लागू करने की कोशिश की है, दोनों सफलतापूर्वक नहीं चले गए हैं यहां मैंने नॉकआउट मान्यकरण को लागू करने का प्रयास किया है:

मेरी स्क्रिप्ट बहुत सरल है, मैं बस इस तरह के दो अवलोकनों पर सत्यापन करना चाहूंगा:

  self.emailAdd = Ko.observable ("");   

मैंने इसे ऐसा करने की कोशिश की है:

  self.emailAdd = ko.observable ("")। विस्तार ({आवश्यक: {संदेश: कृपया अपना ईमेल पता प्रदान करें। '}});    

मेरे आवेदनों के नीचे jQuery के मान्यकरण को रखा और 'सहेजने' के साथ दृश्य मॉडल का नाम बांधा गया : <पूर्व> $ ("# getAcc") मान्य करें ({submitHandler: authViewModel.save});

asp.net - Have to specify Assembly name for all class references -


VS 2010, .NET 4.0, VB, EF 4.4

In my web application deployment I had problems on server ... error "Could not load type" when I try to run it on server Googling was doing around I also found that there should not be a "App_Code" folder in my web app (shared with other corporate web sites but copying code) so I used to route all sections from App_Code to root ("BLL" One of our code libraries' namespaces) Moved Older.

Now when I VS If I run the app in the IDE then I get the error "Configuration error. Type could not be loaded 'BLL.Roles'" coming from the load of web.config. If I add the assembly name of the app in front of "BLL.Rolls"; "APNAMLLolls" I get out of this line and I get an error in the next reference of "BLL".

I have a Klein and my project is rebuilding.

Why are sections not being recognized as part of the app?

I may be wrong but I believe because you are using a web site and web No applications only Access classes that are in the App_Code folder. If you are working with a web application, then you can access sections, even if they are inside the folder. In that case you may have to move your files into a new project which is under an application format and not a web site format. I will try to move your files into a web application project.

jboss7.x - jBoss slowness in a VMWare ESXI Virtual Machine -


We have a Java EE application that runs in JBoss 7.1.1, and we have virtualmachine (like VMware ESXI)

The thing is, when we run our app in VM, the performance decreases by almost 50%.

It seems as if GC goes crazy ... so far I can tell, when GC runs, it takes more than usual "end", and in the meantime it stops the application .

Does anyone have such an experience?


Edit
  • XMX and XMS = 1 GB in JVM
  • VM has 4 GB RAM
  • Ubuntu server 64
  • Oracle JVM 64

    I would say that Before moving the app to VM with the configuration, it was running on 32 bit system and 32 bit JVM and using the same JVM parameter.

    The trick is that you have gone 64 bit with 64 bit Java but still have submitted the size of the pile of the same size to your application, what really happened is that Your app has half the memory available, which used to be 64bit jvm, each object is twice the size of one of the 32bit jvm.

    I have provided some configuration, which I recommend:

    • Increase the hep size for 2g
    • or 32bit jvm

      Use

      Given that your application does not exceed 1.3g, it thinks that the best performance will be achieved by 32 bit JVM Running with and -Xms1300m-Xmx1300m.

      You can also move forward and 32 bit VM with 32-bit Linux installation. 64 bit jvm is only useful if you need more than 1.3 caps, otherwise it only adds too much overhead.

      In addition to this, you will see jvm

        -verbose: gc - XX: + PrintGCDetails   

      this will show you what with GC It's going to be more helpful in tuning your jvm.

python - [django]: How to validate request for new account from mail? -


I have a simpler way to create a new user in Django

Also, I request that (From the user), I want to send in the administrator's email, and just the administrator can enable that account. The user has to wait an answer from the administrator. If the administrator enables that account, then the user is going to be able to use the account!

with user is_active = False , then you can easily DJGongo Adradman can filter on the panel. Or you can use the degego signal , such as the signal to send an email to the administrator's email, the email can be included with an activation link which is unique to activating the user . To keep the inactive user you can create a different model and generate a random handwriting key for each record. You can use that random-hash key (token) in the activation link that you are sending to the administrator's email.

There are already some apps that allow you to handle registrations, for example but in your case this is a bit difficult because you want administrators to activate those users. So I suggest you look at the source code. It is very clear and easy to understand. Just read the code and you get the point.

android - When is populated the listview associated to a ListFragment -


मेरे पास यह कोड एक ListFragment के अंदर है:

  TextView tv = (TextView) यह। getListView () getChildAt (0)। tv.setBackgroundColor (। getResources () getColor (R.color.White)); tv.setTextColor (। getResources () getColor (R.color.OtherColor));   

मुझे इस कोड को ऐक्टिविटी सिलेटेड पर लिखना है, लेकिन टीवी शून्य है।

अगर मैं इस कोड को अंदर लिस्ट आईटेमक्लिक में लिखता हूं, तो यह पूरी तरह से कार्य करता है।

है यह क्या दुर्बल है जो मैं चाहता हूं?

कोड:

  सार्वजनिक शून्य पर गतिविधिक्रियाकृत (बंडल सहेजे गए इन्स्टैंसस्टेट) {super.onActivityCreated (SavedInstanceState); स्ट्रिंग [] मूल्य = नया स्ट्रिंग [] {getResources ()। GetString (आर। स्ट्रिंग.मेनू_पार्टीडा), getResources ()। GetString (R.string.menu_acciones), getResources ()। GetString (R.string.menu_resultado)}; ArrayAdapter & LT; स्ट्रिंग & gt; एडेप्टर = नए अर्रे एडाप्टर & lt; स्ट्रिंग & gt; (getActivity (), आर। लय आउट.लिस्ट_इटेम_मेनू, मान); setListAdapter (अनुकूलक); }    

दृश्य केवल "सृजन" कॉलबैक के क्रियान्वयन के बाद ही आकर्षित होते हैं, वहां इस घटना के लिए कोई कॉलबैक नहीं है हालांकि आप पोस्ट () यूआई हैंडलर को एक रननबल और एक ही चीज़ प्राप्त कर सकते हैं:

  getListView ()। पोस्ट (नया रननाबल () {सार्वजनिक शून्य चला ( ) {TextView tv = (TextView) this.getListView ()। GetChildAt (0); टीवी.सेटबैकग्राम रंग (getResources ()। GetColor (R.color.White)); टी वी .सेट टेक्स्ट क्वॉलर (getResources ()। GetColor (R.color लेकिन अन्यथा, यह परिवर्तन ऐसा नहीं करेगा जो आप की उम्मीद करते हैं क्योंकि पंक्ति सूची को सूची-सूची में पुनर्नवीनीकरण किया जाता है। (स्क्रॉलिंग के दौरान आप उन्मूलन व्यवहार देखेंगे।) आपको  स्थिति 0    पर पंक्ति के लेआउट को बदलने के लिए एक कस्टम एडॉप्टर बनाना चाहिए। आप रननबल से दूर हो सकते हैं क्योंकि आपके पास केवल तीन पंक्तियाँ हैं, लेकिन सबसे अच्छा समाधान एडाप्टर का विस्तार करना है।   

backslash - Changing "/" into "\" in R -


I have to change "\" in my "R" code I have something like this:

  tmp & lt; - paste (getwd (), "tmp.xls", sep = "/")   

This is my tmp c: / study / tmp .xls

And I should have it: c: \ study \ tmp.xls

Is it possible to change it in R?

According to the update comments.

If this file is to be saved, as @gababb has suggested, you file.path () :

  File.path (getwd (), "tmp.xls")   

update 2: you want double back-slash

TMP is a string and if you want a real backslash that you have to save - though with a backslash, when r double slash (example For, when looking for a file with the path indicated by the string), it appears that double slash would be considered as one

what happens when you Cat ()

  cat ("c: \\ study \\ tmp" second slash "has disappeared"  

Basic Answer:

has an escape character in r , \ , if so If you really want to print it, then you need to escape the escape character: \\ This is what you want to put in your paste statement. P>

You can also use . $ $ Form.sep platform as your sep argument, which will make your code more portable

  Tmp & lt; - paste (getwd (), "tmp.xls", sep = .platform $ file.sep)   

If you already have a string that you want to change, you

  gsub ("/", "\\", tmp, fixed = TRUE ) Can use    

c# - Stream chaining in computing a checksum: avoiding memory issues -


I have a FileStream attached to an XML file which I would like to read directly in a SHA512 < / P>

This problem is two times:

  1. I want to leave some of the nodes in Xml
  2. The file is quite large, and the whole thing Can not load in memory

    I can read the entire file in an XML structure, delete the node, then type it into the stream that SHA512.ComputeHash < Plugged in / code> It will be a performance loss, but I like to be able to remove the nodes as an operation in some currents and then somehow combines the streams together in one stream which SHA512 ComputeHash (stream) can be passed in .

    How can I complete this?

     using  (var hash = (Var reader = XmlReader.creative ("input. Xml ") using the new SHA512Cng ()) using (var author = XmlWriter.Create (stream)) (var stream = new cryptostream (stream.null, hash, cryptostream mode.)) {While ( Reader.Read ()) {// ... write author node ...} author.flush (); stream.FlushFinalBlock (); var result = hash.hash;}    

hibernate - Infinispan L2 cache custom eviction policy -


I plan to use Infinishpain as my Hibernate App L2 cache. Life Cycle Attribution is All In My Institutions [New -> Run - & gt; completed ]. Initially my institutions are in a new situation and when the time goes on in other states,

I just want to expel the institutions from the seat, when the entity attains the status of the life cycle characteristic of the whole state. My understanding does not support the equivalent infinispan custom removals policies. What would be the best way to handle my situation?

code> removal (key) method in the right time by the cache API.

Evrts cache of an entry from the memory of the public void eject (k key)

Note that the entry can be accessed from any other cache in any configured cache stores or clusters Is not removed (if used in cluster mode). Cache to remove an entry from the entire cache system. Use remove (object).

Once the unit reaches its full position with "key1" , then you IspnCache.evict ("key1"); For removals.

java - JPS only displays JPS -


I am trying to analyze the memory usage of the use of my Java applications. The acquisition of Hep equipment uses a combination of JPS and JMAP. For some reason, my application is not listed by JPS.

Nothing was listed before, so I thought it could be a permissible issue. I run it in an administrator command prompt and started listing it myself, but it still is not my application.

If I am not mistaken, then it should list both my application and Eclipse because it is a Java application.

This is in Windows 7 64-bit environment.

states have the following:

Instrument hotspot Java on target GPS system Lists virtual machines (JVM). This tool is limited to reporting information on JVMs for which it has access permissions.

The list of JVMs produced by the GPS command can be limited by the permissions given to the principal running the command. This order will only give a list of those JVMs for which the use of the principle is right, as the operating system specific access Control mechanism has been determined by.

Then access issues will certainly prevent the process that the user does not have to run commands, as listed in the output, or have no access to it.

c - Program a mathematical using recursive function -


मैं गणितीय फ़ंक्शन f (x) = sqrt (1 ^ 1 + sqrt (2 ^ 2) प्रोग्राम करना चाहता हूँ + Sqrt (3 ^ 3) + ... + sqrt (x ^ x))) , जहां x होना चाहिए 1 & lt; = x & lt; = 10 मैंने इस तरह से प्रोग्राम को प्रोग्राम करने की कोशिश की:

  डबल f1Rek (int x) {यदि (x & lt; 1) वापसी sqrt (शक्ति (x, x)); वापसी sqrt (शक्ति (एक्स, एक्स) + एफ 1 रैंक (एक्स -1)); }   

फ़ंक्शन पावर भी स्वयं निर्मित रिकर्सिव फ़ंक्शन है:

  डबल पावर (int x, int n) {if (n == 0) 1.0 वापसी; यदि (एक्स == 0) 0.0 रिटर्न; अगर (एक्सपी & gt; 0) {रिटर्न एन * पावर (एन, एक्सपी -1); } यदि (एक्सपी एंड एलटी; 0) {रिटर्न 1 / (एन * पावर (एन, - (एक्सपी -1))}}   

समस्या है f1Rek (int X) फ़ंक्शन, क्योंकि यह sqrt (x ^ x + sqrt (x-1 ^ x-1 ... से शुरू होता है। मैं इस समस्या को एक बहुत सुंदर तरीके से कैसे हल कर सकता हूँ ?

अपडेट:

जिम बाल्टर के जवाब के साथ, मैंने 2 फ़ंक्शन के साथ फ़ंक्शन बनाया है:

  डबल f2Rek (int i, int x ) {If (i & lt; = x) {वापसी sqrt (शक्ति (i, i) + f2rek (i + 1, x));} और वापसी 0.0;}   

क्या है एक पुनरावर्ती समारोह को केवल एक तर्क के साथ परिभाषित करने की संभावना।

च (x) = sqrt (1 ^ 1 + sqrt (2 ^ 2 + ( sqrt (3 ^ 3) + ... + ( sqrt (x ^ x))) )

समतुल्य,

f (x) = g ( 1, x)

जहां

g (i, n) = sqrt (i ^ i + g (i + 1, n)) अगर मैं & Lt; = n, अन्य 0

आपको एलेगा में सक्षम होना चाहिए Ntly उस से अपने रिकर्सिव समारोह कोड।

एक तर्क के साथ एक समारोह के संबंध में:

एफ है एक तर्क के साथ एक समारोह यह एक पुनरावर्ती सहायक कार्य को कहता है जो दो तर्कों को लेता है। यह स्पष्ट है कि रिकर्सिव इनर फ़ंक्शन को दो तर्कों की आवश्यकता है, इनमें से एक समाप्ति मूल्य है, x स्थानीय फ़ंक्शंस के साथ एक भाषा में तर्क को फ़ंक्शन से बाहर फहराया जा सकता है, उदाहरण के लिए,

  डबल एफ (int x) {डबल जी (int i) {रिटर्न (i & lt; = x) ? Sqrt (पाउ (i, i) + g (i + 1)): 0.0; } वापसी जी (1); }   

जीसीसी स्थानीय कार्यों का समर्थन करता है, लेकिन वे मानक सी में नहीं हैं।

window - Language and Platform -


I'm really new to the Windows platform.

I was wondering if you can give me a tip

  • I am working on video dissection, frame rate measurement on which to start the language And which platform is the best and easiest to know
    • Do everything with video frames and image processing measurements.
    • Performance is a big concern so I will not be able to work on Java or any other language. I perform like C / C ++.
    • Please tell me about that context, where I can start on that too.

      Is Opensive a Good Option?

      Thank you.

      OpenCV is definitely a good place to start. The library is written in C ++, has a good API, and is highly optimized. OpenCV's CV :: Matt Data Structure is fast and easy to work with and allows you to make linear algebra on the matrix. There is a large user community in the library, so you can easily get help online online, you can use other libraries in conjunction with OpenCV or implement your custom functions.

      I also suggest using the power of GPU for image processing (when it is appropriate) OpenCV has some functions which are implemented on the GPU, this number will probably increase because the library is constantly updated. (An updated version is released approximately every 3 to 4 months).

jqplot legend event handler click -


Hi, I'm trying to insert the event handler on each line on the legend of jqplot

$ ('# Chart 3'). Bind ('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) {warning (1);});); But for legend lines

This has worked for me:

  $ ('# Chart-id tr.jqplot-table-legend'). Dam ('click', function () {warning ($ (this). Child (). Last (). Text ());});   

So what does this alert is the name of the chain.

android - Using Custom List on SlidingMenu -


I'm trying to implement widgets Koush within SlidingMenu a jfeinstein10, but I can figure it out How are you doing it or if your achievable

I have both working, I can add widgets in any activity and also got a slidingmenu with a different XML.

Using the example code as a base basis

Thanks for the help.

Well, I think using examples of sliding instances the use of frames have some of the Web another example is my piece class, where I'll use Koush widgets

  @SuppressLint ( "ValidFragment") public class MyListFragment extends BetterListFragment {@Override protected void OnCreate (Bundle savedInstanceState, views) {super .onCreate (see SavedInstanceState, see); AddItem ("test", new list (getInternal (), r string. Hello_world, 0, r.drawable.ic_launcher)); }}   

This is my base activity where I would build sliding menu

  public class BaseActivity extends SlidingFragmentActivity {protected BetterListFragment mFrag; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); // Set Set Set Backhandcontentview (R.Let.Menu_Frame); If (Saved InstantState == blank) {Fragment Transaction T = this.getSupportFragmentManager (). BeginTransaction (); MFrag = New MyListFragment (); T. Replay (R.Id.Menu_Frame, M.Frag); T.commit (); .} Else {Mfrag = (Maylistfragment) Thiskgetsupportfragmentmnagr () Findfregmentbyid (Rkidkmenu_frem); } // Slider Menu Customize the sliding menu suite = Slipping menu (); Sm.setShadowWidthRes (R.dimen.shadow_width); Sm.setShadowDrawable (R.drawable.shadow); Sm.setBehindOffsetRes (R.dimen.slidingmenu_offset); Sm.setFadeDegree (0.35f); Sm.setBehindWidth (250); Sm.setTouchModeAbove (SlidingMenu.TOUCHMODE_FULLSCREEN); SetSlidingActionBarEnabled (false); }}   

And this is my main activity

  the public class extends MainActivity BaseActivity {@Override Public Zero OnCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState ); SetContentView (R.layout.activity_main); }}   

Hope it will help someone else :)

Is there an appropriate way to model "execute after" but not "depends on" for a Gradle task? -


I'm not sure this is possible, but I want to be able to do something like this:

  Tasks myTask (executeAfter: myOtherTask) & lt; & Lt; {// do something}   

Where my task will wait before completing my other tasks, but if my author task is not clearly designated during the build script allocation If it was done, it would not be executed as a dependency on my task (as it depends, due to this happens).

I had the idea of ​​using this linking, although I'm not sure that it can actually be implemented in this way in Gradal's lifecycle. Task.metaClass.executeAfter = {Dependency Task -> If (& lt; some condition & gt;) {this.dependsOn (Dependency Task)}}

It seems that the bridge is not available yet.

ios - How can i add a video as a HUD element in iphone sdk -


I want to add a video that when I call it, but a normal (segment-to-bound) view Do not look similar to HUD to see how to load and background dark in the middle How can I load a video from LBYoutubeController or basically? Thanks!

EDIT: Ideally it will take up to 60-70% of the screen in the video box, but again it will be centered and the background will be filtered

You must use a MPMoviePlayerController . You can set controlStyle to MPMovieControlStyleEmbedded and this will not give you a player, which has no control. To make the video correspond to the frame you set regardless of the natural layout of the video, set scaling mode to MP3 MPVascalingModelFile . Just add your player's view to your view hierarchy and you're ready to go.

  MPVPlayer Controller * Movie Player = [[MPVVplayer controller ALLOCK] INS]; Movieplayer.scalingMode = MPVScachingModelFilm; Movieplayer.controlStyle = MPVM Controlled Styles Embedded; [MyView addSubview: moviePlayer.view];   

To add a dimming view behind it:

  UIView * back = [[UIView alloc] initWithFrame: myView.bounds]; Back.backgroundColor = UIColor.blackColor; Back.alpha = 0.7; [MyView insertSubview: back downviewview: myView];    

Bind Socket Android -


One problem I Android is I have an application which local IP address (device interface) and other remote address Asks the user for The application must be linked to the specified local address and connect to the remote address. Quite simple, but, in fact, the dam ass I hope ..

I do not work on adding the following permissions on the manifest file:

   & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" />   

The source code is as follows:

  The public class increases the main activity activity {string tag = "tag"; Personal difference LOCAL_PORT = 4444; Private Inc REMOTE_PORT = 80; Private editing text is local; Private Editing Text Remote; Private Button Connect; Private textview status; Private context reference = this; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.activity_main); Local = (Edit Text) Find VVBID (RID Edit Text 1); Find Remote = (Editing Text) VVBIID (RID Editlet 2); Connect = (button) FindById (R.id.button1); Connect.setOnClickListener (New View.OnClickListener () {public void onClick (View v) {BotleneckHandle work; Toast.makeText (getApplicationContext (), "action", Toast.LENGTH_SHORT) .show (to connect); / * if (local .getText (). toString () == null || REMOTE.getText (). toString () == null || LOCAL.getText (). toString (). equals ( "") || REMOTE.getText ( ). toString (). equals ( "") || LOCAL.getText (). toString (). equals ( "") || REMOTE.getText (). toString (). equals ( "")) Toast.makeText ( reference, "wrong parameter", 2000); else {Toast.makeText (getApplicationContext (), "Connecting to proceed", Toast.LENGTH_SHORT) .show ();} * / function = new BotleneckHandle (); wORK. Execute ();}}); STATUS = (TextView) findViewById (R.id.textView1); } Private class BotleneckHandle AsyncTask and lt; Zero, zero, string & gt; {Socket Skeet = Faucet; String returnstatement = new string (); Socket Attendor LocalEditor = New Inset Socket Attendor (Local.Get Text). ToString (), LOCAL_PORT); Protected void onPreExecute () {} Safe string doInBackground (Zero ... parameter) {try {string s = new string ()). S + = "Local =" + LOCAL.getText () toString () + ":" + LOCAL_PORT + "remote =" + REMOTE.getText () toString () + ":". + REMOTE_PORT; // So far so good, confirmed by debug toast. Make Text (getApplicationContext (), S, Toast.lNGTH_SHORT). Show (); // Because of this fact, nothing has been shown that I have not published it as an asynchronous work update .. // binding for local address Skt.bind (localAddr); // can not force: - / / / remote host skt = connect to new socket (REMOTE.getText (.) ToString (), REMOTE_PORT); // If the tie is a comment, still does not work .. I bet RestStatemente = "connected"; } Hold (unknownhostexception e) {e.printStackTrace (); Toast.makeText (Reference, "Unknown Remote Host", 2000); Return Stattament = "Not Connected"; } Hold (IOException e) {e.printStackTrace (); Toast. Make Text (Reference, "Connection Failed", 2000); Return Stattament = "Not Connected"; } Finally {try {Skt.close (); } Grip (IOException E) {// TODO Auto-Generated Catch Block e.printStackTrace (); }} Return Return Static; } Secure zero (string result) on PasteXsect {STATUS.setText ("CONCATION STATUS ==" + result); }}   

}

Am I doing wrong on the dam? As far as I am watching, and as I have searched for its good .. Did I miss something?

Merciful

Before you specify it anything on a variable Binding is trying to call. So still its weakness is not going to work before you can call methods on it, you have to make an example of the socket.

Defining custom operators in ruby -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 3 जवाब

    मैं सक्षम होना चाहूंगा कस्टम ऑपरेटर को परिभाषित करने के लिए क्या यह संभव है? उदाहरण के लिए, एक *** बी का मतलब कुछ करना

    क्या बंदर पैच मौजूदा ऑपरेटरों के लिए भी संभव है? उदाहरण के लिए, a ** b हमेशा एक फ्लोट लौटाएं?

    <पी > हाँ, आप कर सकते हैं उदाहरण के लिए: <पूर्व> वर्ग Fixnum def ** (x) self। * (X) * 1.0 अंत अंत 5 ** 4 # == & gt; 20.0

c# - Windows phone 8 Silverlight toolkit prefixes not available -


I have a website that sends data or queries for all devices (iOS, Android, Windows Phone), DSB type As JSON is using. WindowsPhone Toolkit and Silverlight Toolkit are installed with Nougat.

The problem is that the chart prefix is ​​not defined!

The code sample I want to use:

  & lt; Charting: Chart & gt; & Lt; Charting: Purseries title = "test item" items source = "{binding item}" dependencywayway = "itemview" independent independent page = "title" /> & Lt; / Charting: Chart & gt;   

I searched around for a solution, I also went to Toolbox in VisualStudio & amp; The chart is not present in the mix of the tool, although since 2010 there was a button in the YouTube tutorial, so I did not know if Silverlight was not installed properly or because it was left in the new 2011 or 2012 version because the Silverlight is the same free Another one is paid & amp; I want to use this method.

Can you please explain the problem and how to fix it? In general, you need to add a namespace statement to the "top" tag of your XML file:

xmlns: charting = "clr-namespace: system.Windows.Controls.DataVisualization.Charting Blog, this approach has been successfully implemented in a Windows Phone 7 application, when Silverlight Toolkit is downloaded from

However , I'm almost 100% sure it will work with not Windows Phone 8, Because me Do not believe that Silverlight Toolkit is compatible with WP8.

Specifically, if you have WP8 projects in the solution of your VS 2012, then NuGet will give you Silverlight Toolkit , because it can not detect any project compatible with Toolkit (only Silverlight 4 and higher supported).

Above my head, here There are some professional Windows Phone Toolkits, which include chart controls: < / P>



java/spring/tiles - elegant way to display data from multiple entities? -


I have java / spring / tiles app - basically a collection of forms, at the end of this, a user Would have filled the figures of at least one unit or more than five.

I need to display a summary screen, which displays all the data entered by the user. At this point, I will know which objects the user has inserted and I have access to them. I was trying to come back in a clear way to display all that data. My initial idea was that it spit dynamically to use the Justil / L, but it got faster by hand I am trying to do this for each object:

  & lt; C: If test = "$ {empty object1}" & gt; $ {Object1.field1} $ {object1.field2} & lt; / C: If & gt; ... & lt; C: If test = "$ {Null object 5}" & gt; $ {Object5.field1} $ {object5.field2} & lt; / C: if & gt;   

I think it is necessary to have an account for five things like this worthless - it seems just unnecessary (plus more than two fields per object). Is there a better way to go about this kind of thing? I'm really very open to any solution, I just went down the JSTL path here because I thought there was a way to iterate on each object's fields, but if I did not get any examples. So some greasy, or just bash through it with jstl like this? Any suggestions would be most appreciated.

You can create an interface (example: GenericFormObject ) Objects are implemented by, and there is a method to display them as HTML (like: getHtmlString () ).

Then you store all of your form objects in one, and you do something similar in your JSP:

  & lt; C: forEach var = "formObj" item = "$ {formObjCollection}" & gt; $ {FormObj.html String} & lt; / C: forEach & gt;    

php - multiple mysql queries with different result names -


I have two questions from the same table and select the same information, but the results send on two names. There are two variables to store the result, but how do I store other information from the query?

  need_once ('connectvars.php'); $ Dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die ('Error connecting to server, line 20.'); $ Query = "SELECT COUNT (Art) from Artwork"; $ Number of ID = mysqli_query ($ dbc, $ query) Total number of / or die ("query error, line 22"); $ Line = mysqli_fetch_array ($ result, MYSQL_NUM); Find_pic (); // Get two ID numbers ($ count1 = $ count2 or name = "") {// check the problem line if calculation = a second or any name = nothing;); // if true, run the function again} while ($ count1 = 37 or $ count2 = 37) {// if any calculation = 37 find_pic (); // if true, run the function again} show_pic (); Function find_pic () {$ count1 = rand (0, $ line [0]); $ Count2 = rand (0, line [[0]); $ Query1 = "SELECT * FROM artwork WHERE id = $ count1"; $ Query2 = "SELECT * FROM artwork WHERE id = $ count2"; $ Result1 = mysqli_query ($ dbc, $ query1) or die ("query error, line 38"); $ Result2 = mysqli_query ($ dbc, $ query2) or die ("query error, line 39"); }    

If the whole point is to get two random images, why not do it? SELECT is the artwork from WHERE ID! = 37 and name! = '' ORDER BY RAND () LIMIT 2

c# - Unable to use dapper, "Several methods are applicable" -


I am trying to use dipper to perform simple crude operations in a SQLite database, but I'm having trouble Because the compiler is blaming an error that I just can not decide

the error in the query "conn.execute ..." is in line and it says:

C #: Several methods' (string, DB manager). (Anonymous)) ':' Dapper. SQLMapper Except (System.Data. IDB Connection, String, System.Data. IDB Transaction, Int ?, System. Data Commands Type)? And 'Dapper SQLMaper. Exit (System.Data.IDBConnect, String, System.Data.Idb Transaction, Int ?, System.Data. Commands Type?) 'DB Manager. C.

Below is my code, I try to put everything here but it seems useful to see it but not too much.

  Using the system; Using System.Linq; Using Dapar; Insert public bubble (scheduler history record) {int res = -1; If (record == zero) return false; Try {// var db = new SQLDatabase (); String sqlquery = "Enter the value in the scheduler history (JobID, Nextjob, Last Job, ExecuteOnStart) (@jobid, nexbob, @lastjob, @executeonstart);"; (Use var conn = new System.Data.SQLite.SQLiteConnection (m_connString)) (conn.Open (); Conn.Execute (sqlquery, new {JobId = record.JobId, NextJob = `record.NextJob, LastJob = record. LastJob, ExecuteOnStart = record.ExecuteOnStart}; `Returns (RACTC; 0);}} Grip (Exception Pre) {LogWriter.Error (ex); Description is False;}}   

Note that "using Dapar;" VS has not been used by 2012, and the method that has not been used has already done it, because I was thinking that Dapar would be useful. [/ P> < / Div>



Is this scheme code tail recursive? -


Edit: Thanks for everyone I'm new to language (just started experimenting it two days ago) , So I'm unfamiliar with the Condoles. If I have time, then I can write it again, but I wanted to make sure that I have basic logic properly. Thanks again!

My job is to create a tail-recursive function, which removes the nth element from the list, 1 & lt; = N & lt; = Listlength, with only two parameters, list x and element n, therefore, (1) (ABCD) will be returned (BCD). I have written the following, and I need some assurance that this is really tail recursive. The only thing I am fuzzy if the recursive call can be nested inside the IF statement.

  (define nx); If n is 1, then simply cdr (if (and not (not (list (car X)) () = (1 =) 1) (CDR X); If the car is not a list, make it one, and call again (If not (list (car X)) (Remove (- N1) (opposition (list (car X)) (CDR X)); if n! = 1, insert the cadre into the list in the car; Other, add the list to the car Cddr (cddr x) (cddr x) (cddr x) (cddr x) (cddr x) (cddr x));))))))) < / Pre>  

Yes, the process is tail-recursive, which means: wherever the recursive The call is done, this is the last thing that happens in that particular branch of execution, in which nothing happens after the recurring return - so we say that the recursive call is in tail position

It can be clearly seen that we instead rewrite the process using cond nested if s, you will see that the execution Every branch leads to a base position or a recursive case , And all are in a position recursive call Tail:

  (define (remove Nx); Base case # 1 (code (and (not list (car X)) (= N1); Returning from base case, this is not a recursive (CDR X); recursive case # 1 ((not list ( The car is in the position of the tail (remove (- 1) (opposition (list of car x)) (CDR x)); Recursive case # 2 ((not (= N1)); base case # 2 (and returning from the base case); Recurring call is in tail position (Remove (N1) (opposition (Annexure (Car X) (list cadre x))); Not recurrent   

for a more technical explanation of a if / as a result of alternate parts> specially It can be considered tail-recursive, a noticeable algorithm language plan on section 3.5 of the current draft of the revised ^ 7 report - language specification, is here on the PDF file (briefly the same idea applies R5RS, it is just that they R7RS has been explained in more detail). े:

If one of the following expressions is in reference to the tail, then the sub-expressions are shown as "pseudo-expression"? In the context of tail

...

(If one ?? Expression? An ¨ ¨ ¨ anl expression expression ???? < / S> ???????>

(If a ?? expression ?? ¨¨ ¨ailail expression) ?? ©

.net - Iterative process to return second lowest value -


I am quite new to vb.net and after many hours of searching no specific help can be found.

I have a table of data points with three columns, column 1 is "point id", column 2 is "x coordinate" and column 3 is "y parallel". I have to add a quarter column and then have to populate it with the second lowest value from the repetition process.

The recurring process is getting distance from that point to the second point so that the second lowest value will be the minimum value 0 (the distance of itself). Mathematics sqrt ((x2-x1) (x2-x1)) + ((y2-y1) (y2-y1)) for distance between point 1 and 2 point.

I have a recursive process within a recursive process to keep a single value again.

Any help would be very appreciated :)

Wade through rows in your table, then again for each row again through rows in your table. But when you reach the line, then your primary challan is on, you can skip that one and move on. Apart from this, since the distance pairs, you only need to repeat to get all the distance through half the rows in your table.

If you post some more information about this, it may be possible to help you with some code, but as it is now, you can not even say that What type of table do you have or how your program is set, it is difficult to be more specific.

Can perform getQueue() for nonexistent Azure SerivceBus Queue using JAVA sdk -


calls ServiceBusConstract.getQueue (path) in the last 26 or so hours where the path is a non-existent queue Service Access Whose final reason is the binding problem.

Reason by: javax.xml.bind.UnmarshalException: Unexpected element (Yuri: "", local: "feed"). Expected element & lt; {} Quassessation>, & lt; {} Subscription description & gt;, & lt; {} Subject Disecution & gt ;, & lt; {} Entry & gt; At com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent (UnmarshallingContext.java:647)

This is true when using both versions of 0.4.0 and 0.4.1 of SDK .

Earlier, this call returned a GetQueueResult, whose .getValue () method was returned to the empty space. It was found that my test is now failing.

Is production services not now compatible with this call? What is the expected behavior of ServiceBusContract.getQueue (nonExistentPath)?

It is expected to throw a ServiceException to validate this behavior, we actually have a unit test , Please see getNonExistQueueFail () in the following file.



osx mountain lion - Xcode 4.6 does not recognize SDL.framework -


Let me consider a complete and complete newbie when it comes to compiled languages ​​(and Xcode IDE in general) < / P>

I have some tutorials to install XCode to work with SDL frameworks, they take a little longer, which was designed to work with OSX 10.6 or 10.7, so I did it Also ensured that I am following within the Readme SDL DMG. / P>

I did not know where in my file system my SDL.framework (or any other framework such as SDL_image.framework, for that matter). I have tried

  / library / framework / system / library / framework / library / framework   

When I open the xode and add frameworks to add Browse / link for SDL frameworks are not available anywhere.

When I opened a template project that was downloaded from all the framework references, then 'error' or 'do not exist'. >

Can anyone tell me, where should I keep those things? Oh, and any update Xcode + SDL setup tutorial would be great for me!

Assume that you have downloaded SDL.Framework or the SDL2 framework is compiled if you If you are working on the version, it does not matter if you have linked it correctly to your project, it will not be used as much. I usually place them in / library / framework

Step 1. Choose your build target and select the Build Settings section. Then search for framework search path or alternatively scroll down from search path and expand if necessary

Step 2. Your project To incorporate the framework in, select your build goal and select your goal. Expand Build Stages section Link binary to libraries and click on the + button in the popup window that appears you can click on Add another , Then browse the framework where you have placed the framework, select the framework for adding the / Library / Framework .

macros - Scala: Get type name without runtime reflection and without type instance -


I want to get a type of name, as a string, without runtime reflection.

Using a macro, and with an example of type, I can do it like this:

  def typeNameFromInstance [A] (example: A): string = macro typeNameFromInstanceImplementation [A] Def typeNameFromInstanceImplementation [A] (c: context) (Example: c.Expr [a]): c.Expr [string] = {import c.universe. _Value name = instance.actualType.toString c. XPR [String] (Little (Constant (name))}   

How can I do without this type of example? I like the signature of a function:

  DF type name [A]: string   

I can not use class tags because they do not have full type of name I just can not use a typewriter.

Edit: It appears that This is not possible in full generality (for example, nested function calls). This comment has been given in the acceptable answer given below.

You can use a tree that represents the macro app: c.macroApplication

  def typeName [T]: string = macro typeName_impl [t] def typeName_impl [T] (c: context): c.Expr [string] = {import c.universe._ Val TypeApply (_, list (typeTree)) = c.macroApplication c.literal ( TypeTree.toString () }   

Edit:

There is another way to get one, but maybe a little better:

  def typeName [T]: string = macro typeName_impl [t] def typeName_impl [t: c .WeakTypeTag] (c: context): c.Expr [string] = {import c.universe._ c .literal (weakTypeOf [T] .toString ())}    

HTML/CSS: Keep Hovered Image in Menu Title While Hovered Over Submenu -


I have a menu that has an image for its title, and replaces images when it is no longer done However, I want to put it on the same image, when I am hovering over the sub-menu that opens under it, instead of returning to its latent state instead of returning to it. Can it be done with HTML / CSS?

Here is the CSS code:

  ul # nav {margin: 0 0px; } Ul.drop a {display: block; Color: Transparent; } Ul.drop, ul.drop li, ul.drop ul {List-style: None; Margin: 0; Padding: 0; Border: 0 px solid #fff; Background: Transparent; Color: transparent} ul.drop {status: relative; Z-index: 597; Swim left; } Ul.drop li {float: left; Line-height: 1.3 AM; Vertical-row: middle; Zoom: 1; } Ul.drop li.hover, ul.drop li: hover {status: relative; Z-index: 59 9; Cursor: default; Background: Transparent; } Ul.drop ul {display: none; Status: Completed; top 100%; Left: 0; Z-index: 598; Width: 100%; Background: Transparent; Border: 0 px solid #fff; } Ul.drop: Hover UL {Display: Block; } Ul.drop ul li {float: none; } Ul.drop ul ul {top: -2px; Left: 100%; } Ueldrop Lee: Hover & gt; Ul {visibility: visible}   

and here is HTML

     

mmm .. I have a special move for you, I hope you Would love it. I am creating HTML like this:

  & lt; Ul id = "nav" class = "drop" & gt; & Lt; Li class = "icon 1" & gt; Hover Me & lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" onclick = "warning ('IAM click')" & gt; Hidden menu & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li class = "icon 1" & gt; Hover Me 2 & lt; Ul & gt; & Lt; Li & gt; Hidden menu & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; / Ul & gt;   

and thus run special CSS:

  ... ul.drop li.icon1 {background: URL (YOUR_IMAGE) no-repeat left top; Width: 140px; } Ul.drop li.icon1: hover {background: url (YOUR_IMAGE_HOVER) any repeating left top; } ...   

Demo here:

tile - C++ 2D Array Map for Tiling Output Inverted -


I created a 2D array that displays the map for my tiles:

 < Code> int esap [12] [20] = {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 , 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1}, {1, 0, 1, 0, 1, 0 0, 0, 0, 0, 0, 0, 0, 1, 0 , 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, , 1, 1, 1, 0, 0, 1}, {1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 1}, {1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1}, {0 , 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 1}, {1, 1, 1, 2, 2, 1 , 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 0 , 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1} };   

Once my tiles have been loaded, I do this by using the function () to do the tiles:

 For  (int y = 0; y and lt; 12; y ++) for {// (int y = 11; y> gt; = 0; y -) {for (int x = 0; X {20 for x ++} {// (int x = 19; x> = 0; x -) {if (sMap [y] [x] == 1) GlobbeltTextings (GL_Edit DD, brick 1 ); Otherwise if (asmap [or] [x] == 2) globinated (GL_TEXTURE_2D, brick 2); Second globinated (GL_TEXTURE_2D, wall); GlBegin (GL_QUADS); GlTexCoord2f (0.0 f, 0.0f); GlVertex3f (float (x), float (y), 0.0 f); GlTexCoord2f (1.0f, 0.0f); GlVertex3f (float (x + 1), float (y), 0.0 f); GlTexCoord2f (1.0f, 1.0f); GlVertex3f (float (x + 1), float (y + 1), 0.0 f); GlTexCoord2f (0.0f, 1.0f); GlVertex3f (float (x), float (y + 1), 0.0 f); GlEnd (); }}   

For some reason, my map is inverted ... (hence the top map is the line below the digits screen But the top line of the tile and the second line on map is the second line of tile on the screen).

Its my understanding, you repeat by selecting each digit and specifying the correct tile I have tried to change the x / y but it will rotate the map on the screen So that its <12> x is 12 tiles and y .

I want my tile on the screen to represent the map above. Any way to fix it? Thank you. The fact is that the OpenGL is actually in the coordinate system that is in the point (0, 0). It is in the lower-left part of the viewport, so if you want to draw the matrix in the same way it should attract it, then you should & lt; Viewpoint height & gt; As for drawing, y coordination must be calculated. - (calculated) How to achieve that height - it is up to you, perhaps you have defined it in the code first. For example, float (y + 1 + offsety) will be float (HEIGHT - (y + 1 + offsety)) .

Edit

for (int y = 11; y> gt; y = ); Y -) {

Instead of the external beginning of the loop and this is the same. But, anyway, it is good to know that this is not inverted by mistake as you thought - it's just for synchronizing the system.

joystick - What is the most efficient way to quickly understand how a complex LabView VI works? -


What is the best way to understand a complex lab VI VI?

My goal is to control one from the motor

The wiring diagram shown below allows the LabWeO user to control the motor with LabViv GUI: take a slider up and down Go either to increase the desired speed or to change the value of the slider, it is fed into a group of mathematics controls and eventually the command for the motor is converted into a string. This command string, if I understand correctly, is a bunch of bytes that are written on the serial port.

Instead of using the LabView GUI to control the motor, I would like to use the joystick

What is the best way to reach it?

The joystick has pitch, o, roll, and throttle. Which of the best is the velocity of the motor?

Enter image details here

< Div class = "post-text" itemprop = "text">

Respond to your headline "What is the most effective way to understand how complicated Labvi VI VI works?" Perhaps some combination of the following is to:

  • To look at the input and output of the pseudo and understand what they are, the label and captions of the control and indicator can be useful, details and tips Right-click to check
  • Along with the controls and indicators, check other I / O: queue, indicator, global variable, reading / writing files, communication to write, and any data storage which is an irregular rain Continuation between calls like register.
  • Look at the overall structure of VI how it executes, e.g. Is it a closed operation, does it execute different cases based on some input, does it loop until it is a fixed position, whether it uses a state machine structure, etc.
  • Breaking the sixth structure into pieces, which you can understand, you can print the diagram and make a comment by hand or add frame decoration and text comment in the diagram so that you get the result Are spun. If the picture is wasted or poorly excluded, then adjust it again as you go along (Ctrl-click and drag on the dialog background, to add the blank space where you need it).
  • Check Set On Key Wires Set And Hide To see what happens
  • If possible, set the control of the end to the values ​​of values And run to see what happens (this can not work if VI depends on other parts of the program at the same time)
  • Write a test wrapper VI, which calls the complex end Does it and see what happens Provides wiping data or inputs. / Li>

    To solve your specific question about the 6th diagram you posted, I look at various controls for velocity, position, dimension, max A (dimension?), Frequency etc. I can. . You need to decide which of these dosages should be controlled which should be the axis or output of your joystick. Then you need to add code that reads those values ​​from your joystick, and modify the existing code so that the parameter you want to control is provided by joystick values ​​instead of front panel controls. You could possibly just put the joystick reading code inside the existing loop, to replace the joystick output with the wires, with the front panel controls you want to change, and then the right-click for the indicator from the right-click menu Can change panel control So that they will show the values ​​you get from the joystick.

ruby on rails - Conditionally include child nodes with RABL -


I think I have a very basic case when I return to JSON for standard restored controller methods I am using rabl ...

First we say that with my parents and children is a typical one for many relatives (let's say the customer and accounts):

  class clients & lt; ActiveRecord :: Base is has_many: accounts end   

For the customer, I am indexed and edited in my controller - the index where I just want to return all the customers (without accounts) And edit where I have to go back with a specific client index along with all their accounts, I do not want to return the accounts for obvious execution (N + 1) reasons.

In my Rabble, I have the following:

  #index Rabl (to list all customers) Archive: @ Customer "customer / _customer"   

and

  # edit.rabl (for editing a single client) Object: @ Customer Expands "Customer / _customer" < / Code>  

I am reusing _customer.rabl for both index and editing.

  #_ customer.rabl Item: @ Customer Attributes: Name, ...... If @include_accounts Child: "Account / _account" end of expiry ends in accounts   

I do not work on these included_count (controller) and not indexes included in my edit - essentially the frequency here (@include_accounts) never passes down. What is the correct pattern to implement it?

Although rail-rabl gem claims that it is fast, I came to know that templates are not flexible For conditional expression - see rabl-rails readme re: example variable.

r - Scatter Plot with Varying Point Sizes -


I am a new R user, so please forgive me if my question seems simple about the cookbook and booklet of statistical analysis. Despite research in, I am unable to create a special graph for my liking.

I am trying to graph the two columns. Age and income is the age of an integer value (40, 34, 50, ...), whereas the binary values ​​in the earnings (& lt; = 50k , & Gt; = 50k). There are 32561 rows of data with different ages. I want to make a plot for my Y-axis, plot (age, income) as X-axis and income binary variable. Of course this leads to two parallel lines with a conspiration because the income is a binary variable which is fine. The information I am trying to get from this conspiracy is the number of people of any age who comes in any of the income bucket. The way I would like to do this, the size of the circle should be according to the number of people of the fixed age within each income class. For example, if at the age of 25 there were 700 people and the weighting was in = 50k bracket and 150 which fell into other brackets, then the size of the two points would be different depending on the number of people. Therefore, 700 people have been & lt; = 50k falling in bucket will be represented by a large circle and later a very small circle I want to do this for all ages ... I hope this makes sense. Please tell me whether clarification is required or No. Thanks! I'm sure you will not hear me again far in the future.

The answer is easy to answer with the example data, but in this case, with that problem Was quite easy for:

  age = rep (c (20, 30, 40, 50, 60), 20) income = c (representative ("> 50k", 80) First, we prepare a summary of statistics, age and income ("50k", 20)) df1 = data.frame (age = age, income = income)   

In each combination, people get count :

  Library (plyr) df1_summary = ddply :  < / Code>     former>  ggplot (df1_summary, aes (age, income, size = count)) + geom_point ()   

mapped size for size

linux - Extract and copy rows and columns from a large text file -


In addition to my previous question - how can I extract values ​​from a large text file in column format? If I want to remove the value of the specific column, the text file looks like an attached image.

I want to remove ROIL and FSC values, as in the numbers given in the text or plot in Excel.

To be more general - what should I do if I want to remove the values ​​in Part_FSC and CC later?

thanks

text file: Open the MRC / CCP4 file to write "lang-none prettyprint-override"> ... File: map2.mrc NX, NY, NZ: 600 600 600 Mode: Real Cemetery Redundancy: 1 fracture_mask, fraction_peature = 0.1193 0.0111c sqrt sqrt not c. RESOL RING RAD FSPR FSC Part_FSC Part_SSNR Rec_SSNR CC C2 952.50 0.0017 0.09 1.000 0.000 400.0145 479.40 0.1222 C3 476.25 0.0033 0.19 1.000 0.000 15 9.3959 15 9.98 0.1586 C4 317.50 0.0050 0.92 0.9 99 0.000 48.2248 43.27 0.0155 C5 238.12 0.0067 0.42 1.000 0.000 88.3074 76.69 0.2637 C6 190.50 0.0083 0.48 0.9 99 0.000 64.0162 56.25 0.4148 C7 158.75 0.0100 1.41 0.9 9 0.000 17.1695 15.64 0.1282 C8 136.07 0.0117 5.56 0.954 0.000 6.8244 6.47 0.0171 C9 119.06 0.0133 1.4 9 0.9 9 0. 0. 16.1918 16.42 0.2729 C. 10 105.83 0.0150 1.68 0.9 9 0.000 12.8313 13.83 0.3729 C11 95.25 0.0167 3.55 0.969 0.000 6.8012 7.95 0.2624 C12 86.59 0.0183 16.00 0.830 0.000 2.5273 3.13 0.0826 Unchexted, unprostated, But

  awk '$ 1 == "c" {printf "% s \ t% s \ n", $ 3, $ 6}' & lt; Filename & gt;    

SQL Server 2008 Management Studio Not Showing Database -


I got a fresh installation of Windows Server 2008 R2 SP1 and only SQL Server 2008 R2, which includes SQL Server 2008 R2 Management Studio

When I go to the management studio, it does not display the SQL Server instance created during setup. It's only (local) and will not let me connect it at all.

Any thoughts?

First check that the SQL Server 2008 instance is installed, then show up on your SQL Configuration Manager.

If it does not exist, then you need to reinstall SQL Server 2008 R2 and follow these steps at the following link:

And it exists only Add Server Name: yourpcname

Best Relationship

php - Wrap tags inside zend form -


How do I wrap the DT DD tag in the zd file. The last look of my HTML code that is generated is:

  & lt; Dt id = "email-label" & gt; & Lt; Label = "email" class = "optional" & gt; For username (email): & lt; / Label & gt; & Lt; / Dt & gt; & Lt; Dd id = "email-element" & gt; & Lt; Input type = "text" name = "email" id = "email" value = "" & gt; & Lt; / Dd>   

The code for this is:

  $ form-> Adelament ('text', 'email'); $ UsernameElement = $ form-> GetElement ('email'); $ UsernameElement-> SetLabel ('Username (email):');   

I want these two tags to be wrapped inside an original tag such as:

   & Lt; / Div & gt;   

So how could I do this in the Zend framework?

Try it out,

  $ usernameElement-> SetDecorators (Array ('ViewHelper', 'Label', New Zend_Form_Decorator_HtmlTag (array ('Tag' => gt; 'div', 'id' = & gt; 'form_wrapper'))));    

logging - logrotate cron job not rotating certain logs -


मैंने अपने अनुप्रयोग लॉग को घुमाए जाने के लिए "logrotate.d" निर्देशिका में दो स्क्रिप्ट जोड़े। यह उनमें से एक के लिए कॉन्फ़िगर है:

  & lt; myLogFilePath & gt; {Cron.daily "निर्देशिका में एक" लॉग्रोटेट "स्क्रिप्ट है (जो क्रोन लॉग के अनुसार प्रतिदिन चलती है):   

/ P>

  #! / Bin / sh गूंज "logrotate_test" & gt; & gt; / tmp / logrotate_test # / usr / sbin / logrotate /etc/logrotate.conf & gt; / dev / null 2 ​​& gt; और amp; 1 / usr / sbin / logrotate -v /etc/logrotate.conf & amp; & gt; & gt; / root / logrotate_error EXITVALUE = $? अगर [$ EXITVALUE! = 0]; तो / usr / bin / logger -t logrotate "ALERT असामान्य रूप से [$ EXITVALUE] से बाहर निकल गया" FI exit 0   

पहला इको स्टेटमेंट काम कर रहा है। लेकिन मुझे लगता है मेरा आवेदन लॉग घुमाव नहीं हो रहा है, जबकि अन्य लॉग जैसे httpd को घुमाया जा रहा है ** ** ** और मुझे "लॉग्रोटेट_अपर" फ़ाइल में कोई भी आउटपुट दिखाई नहीं देता (सभी के लिए लिखने की अनुमति है प्रयोक्ता)।

हालांकि syslog कहता है: "लॉगोटेट: ALERT असामान्य रूप से [1] से बाहर निकल गया"

लेकिन जब मैं "logrotate" "Cron.daily" स्क्रिप्ट मैन्युअल रूप से, सब कुछ ठीक काम कर रहा है।

दैनिक cron कार्यक्रम के दौरान क्यों नहीं घूम रहा है? क्या मुझसे यहां कुछ गलत हो रहा है? यह बहुत अच्छा होगा यदि मुझे यह बहुत जरूरी मदद मिलती है।

नवीनीकृत: ऐसा लगता है, यह selinux की वजह से है - मेरी यूज़र होम डाइरेक्टरी में लॉग फाइलें प्रतिबंध हैं Selinux द्वारा लगाया जाता है और जब लॉग्रोटेट स्क्रिप्ट चलती है:

  SELinux फ़ाइल /home/user/logs/application.log पर getattr पहुँच से / usr / sbin / logrotate को रोका जा रहा है  SELinux लॉग फाइलों पर लॉग फ़ाइलों पर पहुँच को प्रतिबंधित कर रहा था जिसमें निर्देशिकाओं में जरूरी SELinux फ़ाइल संदर्भ नहीं होता है। प्रकार। "/ Var / log" निर्देशिका में  "var_log_t"  फ़ाइल संदर्भ है, और लॉग -ोटेट आवश्यक रूप से करने में सक्षम था। तो इसका समाधान मेरे आवेदन लॉग फाइलों पर सेट करना था और इसकी मूल निर्देशिका है:  
  semanage fcontext -a -t var_log_t & lt; निर्देशिका / लॉगफ़ाइल & gt; Restorecon -v & lt; निर्देशिका / लॉगफ़ाइल & gt;    

How to install plugins to Sublime Text 2 editor? -


कैसे सशक्त पाठ संपादक को प्लग इन स्थापित करें ?

Emmet plugin को सब्लाइम टेक्स्ट 2 संपादक में स्थापित करना चाहते हैं।

आपको होना चाहिए आपके सब्लाइम टेक्स्ट 2 इंस्टॉल निर्देशिका में एक डेटा / पैकेज फ़ोल्डर। आपको केवल सब कुछ करने की ज़रूरत है प्लगइन डाउनलोड कर और प्लगइन फ़ोल्डर को पैकेज फ़ोल्डर में डाल दिया।

या, पैकेज नियंत्रण प्लगइन को स्थापित करने के लिए एक आसान तरीका <

बस यहां जाएं:

और स्थापित निर्देशों का पालन करें।

एक बार जब आप पूरा कर लें तो आप Ctrl < / Kbd> + शिफ्ट + पी शराब में शार्टकट, टाइप करें और एंटर दबाएं, फिर emmet की खोज करें।

संपादित करें: अब आप तुरंत Ctrl + Shift + पी दबा सकते हैं और इंस्टॉलेशन के बाद कमांड 'पैकेज नियंत्रण स्थापित करें' का उपयोग कर सकते हैं निर्देश। (3126 बिल्ड पर परीक्षण किया गया)

Word by word animation css3 or jquery -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 3 जवाब

    मुझे एक सामग्री है, जिन्हें कुछ एनिमेशन के साथ वेब पेज में प्रदर्शित करना होगा जैसे शब्दों को एक-एक करके हम बोलते हैं। क्या यह jquery या css3 का उपयोग करना संभव है?

    हां यह संभव है। यह उस गति पर निर्भर करता है जो आप बोलते हैं हालांकि। आप आसानी से कुछ बुनियादी jQuery को एक गति पैरामीटर के साथ लिख सकते हैं जो अंतराल पर शब्द प्रदर्शित करता है।

    यहां एक त्वरित जेएसफ़िल्ड है जो मैंने ठीक उसी तरह लिखा था।

      $ (document) .ready (function () {var $ el = $ ('div'), पाठ = $ el.text (), speed = 1000; // ms $ el .empty (); var wordArray = text.split (''), i = 0; INV = setInterval (फ़ंक्शन () {if (i & gt; = wordArray.length - 1) {स्पष्ट अंतराल (INV);} $ el संलग्न (शब्दअरेरे [i] + ''); i ++;}, गति);});   

    वास्तव में अच्छा है जो टाइपराइटर की तरह कार्य करता है जो कि उपयोग की हो।

map - Using Clojure update-in with multiple keys -


I am trying to apply the function to all the elements in a map that matches a certain key.

  (def mymap {: a "a": b "b": c "c"}) (Update-in Mymop [: a: b] # (str "X -"% ))   

I hope

  {: a "xa", c "c",: b "xb"}   

But I get

Class class expansion in java.lang.String in clojure.lang.Angociative clojure.lang.RT.assoc (RT.java:702) Can not be cast

Can anyone help me with this?

update-in to update a key in the map ( At the level of a particular nest, [: a: b] inside the map value of the key: key: a.

Can be:

  (# commode% 1% 2 (str "X-" (% 1% 2)) mymap [: a: b])    

c# - In my WPF application, my loaded PNG logo in image shows at design time but not at run time -


It is probably something simple that I remember I have a PNG file that I have in my WPF window * Image * I want to use as a source of control. I have a project property & gt; Resources & gt; Add the existing file and first as a linked file (and then embedded when it was not working). Then I will add * source * to image control in XAML file. No code is included, simple click

The annoying problem is that when I'm designing the WPF window, the image shows when I run it, it doesnt. Nothing appears.

Update: Added XAMLL code

   below < Window x: orbit = "server.mainwindow" xmlns = "http://schemas.microsoft.com/enfx/ 2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/ Xaml "title =" server "height =" 467.91 "width =" 620.522 "& gt; & Lt; Grid & gt; & Lt; Grid.Background & gt; & Lt; LinearGradientBrush EndPoint = "0.5,1" Start Page = "0.5,0" & gt; & Lt; GradientStop color = "#FF080C59" offset = "0" /> & Lt; GradientStop color = "white" offset = "1" /> & Lt; / LinearGradientBrush & gt; & Lt; /Grid.Background> & Lt; Button x: name = "btn connect" content = "connect" horizontal alignment = "left" height = "30" margin = "425,34,0,0" workspaceElement = "top" width = "134" click = "BTN Connect-link "" /> button x: name = "btn disconnected" content = "disconnect" horizontal alignment = "left" height = "35" margin = "425,69,0,0" vertical alignment = "Top" width = "134" click = "BTN discconnect_list" />  button x: name = "btnandend" content = "send" horizontal alignment = "left" height = "35" margin = "425,120,0,0" wart Klelinement = "top" width = Click "134" = "Bitiansandji" / "& gt; & Lt; ListView x: name = "lsvClients" height = "67" margin = "46,212,260,0" vertical alignment = "top" & gt; & Lt; ListView.View & gt; & Lt; GridView & gt; & Lt; GridViewColumn / & gt; & Lt; / GridView & gt; & Lt; /ListView.View> & Lt; / ListView & gt; & Lt; Image horizontal alignment = "left" height = "100" margin = "31,10,0,0" vertical alignment = "top" width = "101" source = "pack: // cytoophorigin: ,,,, images / ServerMainLogo Png "/> & Lt; / Grid & gt; & Lt; / Window & gt;   

What am I missing? Thank you

When you specify image URI in XAML, then it is not usually necessary to write a full URI is. In addition to the full packed URI shown in the second reply, you should be able to write it:

  & lt; Image ... source = "picture / server_man .png" /> However, you have to make sure that the image file is located in your Visual Studio project folder called  images  and it's set to    

P>

Optionally you build action to content and copy output directory to always copy Or if copy is new . In this case the image has not been embedded as a resource in the assembly of the program, rather it is copied to any directory relative to the executable file.

In XAML (relative) image urr will work in both cases.

ejb - Sending message from Message Driven Bean to Session Bean -


I have a program where a session is created in a ejb project and sending a message to a message The queue uses a bean message that operates on a separate project, I manage to retrieve the message sent from Session Bean. Then the message will be used to get other values, which I have to send back to the session bean. Any ideas on how to do it I would appreciate any help.

Operator: (partial code)

  Q connection connection = QEnationFactor.Cracket connection (); Session = queueConnection.create session (wrong, session.AUTO_ACKNOWLEDGE); ReplyQueue = session.createTemporaryQueue (); Consumer = session.createConsumer (replyQueue); Consumer.setMessageListener (new LpsListener); QueueConnection.start (); Creator = session.createProducer (queue); Message = session.createMapMessage (); Message.setJMSReplyTo (replyQueue); Producer.send (message);   

and my MDB: (partial in onmessage)

  msg = message (message message); String memId = msg.getString ("member ID"); Int OK = mmr.getFine (memId); QueueConnection = queueConnectionFactory.createConnection (); ReplyDest = msg.getJMSReplyTo (); ReplyCorrelationMsgId = msg.getJMSMessageID (); Queue session = queue connection.Sant session (true, 0); QueueProducer = queueSession.createProducer (replyDest); AnswerMsg = createReplyMsg (Quation Session, Response MsgId); QueueProducer.send (replyMsg); Responding to creating a private object message (session session, string msgId) throws JMSException {object message message = session .createObjectMessage (); ReplyMsg.setIntProperty ("OK", OK); ReplyMsg.setJMSCorrelationID (msgId); The answer to the return; }    

If you want to send the message back to the new instance of the bean i.e. A stateless bean, you can just inject a new instance of Bean using the @EJB annotation. If you want to send it to a particular Statebank bean, you should have a way of identifying it in the first message like Bean ID. This ID will then be used to identify the bean, when you are sending a return message.

jquery - Slide form on/off page and expand div -


Okay this can be a bit tricky but I'm sure this is possible. I have two buttons with which I would like to trigger two forms, initially the user sees two buttons and one of the following forms, and when they click on the second button, there will be a slide in a different form, which is slightly larger than the first And expand it to include the page / div. This is the HTML I have so far:

    

I tried to add the following to JS but it does not seem to work:

  $ (document) .ready (function () {$ ('.msg') Click (function () {$ (".msgfm"), SlideToggle (200);}); $ ('.co.co.'). (Function () {$ (". Quoteform" ) Slide Toggle (200);});});   

Enter image details here <

Renew

This is still working for me: / P>

and I also did not set the style of another form for

display: any , because you wanted to display only one for the first time.

Then you will see

  & lt; Div class = "quoteform" style = "display: none;" & Gt;   

This is because the second form is hidden for the first time. Of course, you can add "Display: None" in class CSS style.

Did you want it?

android - Changing the default tag in Debug.Log for Unity 3D -


To filter logs based on tags, they are very useful for debugging the code of Android tags. I Univity 3D When we use

  debug Log   

Unity in logs is unity in the form of tags, is there any way to change this default tag? There is no way to change

You can however display logs as logs, warnings or normal debug messages. Check the square for this.

php - Form credentials redirect to basic auth -


I have site1.com, there is a basic ath form with the user and the original proof has been found near 2. com. When users submit their pass and user name in site 1. com, they need to redirect them to the site 2. com without the original asen credentials because they just enter them on site1.com

  & lt? Php if ($ _SESSION ['http_logged']! = 1) {} (! ($ _ SERVER ['PHP_AUTH_USER']) || Isset ($ _ SERVER ['PHP_AUTH_PW']) {header ('WWW-authentication : Basic Realm = "Good day"); Header ('HTTP / 1.0401 unauthorized'); Echo "<">  Title <401 Authority Required ; & lt; ; / Title> gt; & lt; body & gt; "echo" & lt; h1 & gt; authorization is required & lt; / h1 & gt; "$ _SESSION ['http_logged '] = 1; Exit;} and {$ Credential = $ _ server [' PHP_AUTH_USER ']. ":". $ _ SERVER [' PHP_AUTH_PW ']; header (' location: site2.com '); header ( "Authorization: Basic". Base64_encode ($ credentials)); $ _SESSION ['http_logged'] = 0;}? & Gt;   

I have 2 problems: 1. When the user cancels the press and after returning to the page, thebasic auth form is no longer showing only after restarting the browser again The credentials site 2. com is sent to the site 2. com.

Am I doing the wrong thing?

You are confused with a customer though a server is quite confusing.

In short, You can not tell the browser to authorize another site using the original proof. Period.

Use cookies and cross-site authentication instead.

rest - Error when using musixmatch python wrapper -


I'm trying to use it, but I'm getting a weird error in running. Can anyone tell me what to do to fix the library? $ 3.16 (r266: 84292, December 26, 2010, 22:31:48) [GCC 4.4.5] For more information on Linux2, click "Help", "Copyright", Write "Credit" or "License" & Gt; & Gt; & Gt; Import musixmatch.ws traceback (most recent call final): File "& lt; stdin>", line 1, & lt; Module & gt; The file "MansiMake / ws.py", line 14, & lt; Module & gt; Import musixmatch.api file "musixmatch / api.py", line 167, & lt; Module & gt; Class XMLResponseMessage: Respiration: Typewrall: Error while calling Metaclass Bess Metcalaces collision: A derivative square metaccelle must have a (non-strict) subclass of its metaLas of all the bases. As explained by @jdi, this is a MetaCLASS in prison: Python does not know which class to get XMLResponse messages from.

(This can not be due to both the potential diamond inheritance)

An active state recipe Which automatically fixes this problem (noconflict module):. The drawback is that you have to modify it to enter the Lib Code and resolve the conflict.

Whatever I have seen, this libil was prepared for the purpose of the developer, and can be run with only the environment: neither Python 2.7 (MetaCalus collision) and Python 3.3 (Egg Module Unable to install) module are able to install and test. I advise you to fork the code, and customize it according to your needs.

uitableview - Trying to correctly move UIImageView using gestureRecognizer in iOS -


I have a UIImageView that I am trying to use to use a UIPanGestureRecognizer object UIImageView is located at the top of a UITableView , And works as a scrollbar. I should take this UIImageView user up or down UITableView, not sideways. To accomplish this, I have implemented the UIGestureRecognizerDelegate, and I have the following methods:

  - (BOOL) Gesture Recipient: (UIGestureRecognizer *) The gesture-promoter should be identified with synonymsjesterer : (UIGestureRecognizer *) Other GestureRecognizer {return yes; } - (Zero) Pigestation detected: (UIPNestiocessor *) Identifier {NSLog (@ "What are I called?"); // _ startLocation is a property CGPoint type that I declared in the .h file _startLocation = [identifier location InView: _imageView]; NSLog (@ "dot:% d", _start location); CGRect frame = [_imageView frame]; Frame.origin.y + = frame.origin.y - _startLocation.y; [_imageView setframe: frame]; _imageView.center = _start location; }   

method, pangestructured code is called from viewDidLoad as follows:

  UIPanGestureRecognizer * PanGesture = [[UIPanGestureRecognizer alloc] initWithTarget: Proceedings manually: @Selector (Pan Gesture Detected :)); Pangestier.mxiamannofoutches = 1; PanGesture.minimumOfTouches = 1; PanGesture.delegate = self; [_GadgetRiver: Pangestier];   

Unfortunately, when I try to move it, my UIImage screens go madly all over the place. I want to see a smooth scroll UIImageView go up / down, while The user leaves it. Can anyone see what I am doing?

Just place this row in your handler and delete all others. _imageView.center.y = [Identifier Location Inview: [_viewview supervision]]. Y;

You need to get a place in the review, not the image itself and just replace the center's y value.

jsf - EL expression in c:choose, can't get it working -


मैं इस तरह से कुछ (जेएसएफ 2) कोशिश कर रहा हूं:

  & lt; p & gt; # {} projectPageBean.availableMethods & lt; / p & gt; & LT; c: चुनें & gt; & Lt; c: जब test = "$ {projectPageBean.availableMethods == सच}" & gt; & Lt; p & gt; एबीसी & lt; / p & gt; & Lt; / c: जब & gt; & LT; c: अन्यथा & gt; & Lt; p & gt; Xyz & lt; / p & gt; & Lt; / c: अन्यथा & gt; & Lt; / c: चुनें & gt;   

लेकिन यह काम करने के लिए नहीं लगता है, हालांकि शीर्ष पैराग्राफ में ईएल अभिव्यक्ति गलत से बदलती है, अगले अनुच्छेद हमेशा Xyz दिखाता है?

मैं भी परीक्षण को निम्न में बदलने की कोशिश की:

  $ {projectPageBean.availableMethods}   

लेकिन फिर भी यही समस्या!

सबसे पहले और सबसे महत्वपूर्ण:।

आपकी ठोस समस्या यह संकेत देती है कि # {projectPageBean} सेट हो गया है दृश्यमान समय के रूप में प्रस्तुत करता है, जैसे कि & lt; ui: repeat var & gt; , & lt; h: डेटाटेबल var & gt; , & lt; p: tabView Var & gt; , आदि। इस तरह से null दृश्य बिल्ड समय के दौरान।

उस स्थिति में, आपको सशर्त रूप से HTML को प्रस्तुत करने के लिए व्यू बिल्ड समय टैग का उपयोग नहीं करना चाहिए आपको सशर्त रेंडर एचटीएमएल के लिए एक दृश्य रेंडर टाइम घटक का उपयोग करना चाहिए। पहली पसंद के रूप में & lt; ui: fragment & gt; :

  & lt; p & gt; # {projectPageBean.availableMethods} & lt; / p & gt; का उपयोग करें। & Lt; ui: टुकड़ा गाया गया = "# {projectPageBean.availableMethods}" & gt; & Lt; p & gt; एबीसी & lt; / p & gt; & Lt; / ui: टुकड़ा & gt; & Lt; ui: टुकड़ा गाया गया = "# {परियोजना नहीं पेजबेन.उपलब्ध विधियां}" & gt; & Lt; p & gt; Xyz & lt; / p & gt; & Lt; / ui: टुकड़ा & gt;   

वैसे, Facelets में कोई भी # {} और $ {} के बीच स्विच करने की आवश्यकता नहीं है। जेएसपी के विपरीत, फेसलेट में $ {} वर्चुअल रूप से # {} जैसा व्यवहार करता है। संभावित भ्रम और रखरखाव की समस्या से बचने के लिए, मैं हर समय # {} से चिपक जाने की सलाह देता हूं।

यह भी देखें:


python - Sending an attachment with Google App Engine -

This summary is not available. Please click here to view the post.

sql - How to count rows in one table based on another table in mysql -


I have two tables in a MySQL database, first there is a list of names in the department.

  Department's short name name ------------- | ------------- ACC | Accounting bus. Business ...   

In the second table there is a list of courses in which the name of the department is abbreviated.

  course section | Name ------------- | ------------- ACC-101-01 | Introduction to Accounting ACC-110-01 | More accounting bus-200-02 | Business etc. ...   

I would like to write a question, for each row in the departments table, count me how many curriculum Rows in the table are like my short name something like this:

  short name | Number ------------- | -------------- ACC | 2 buses 1 ...   

I can do this with a query for a personal department

  from SELECT COUNT (*) course where section '% ACC % (Gives me 2)   

Although I can loop through PHP and I can do the above questions many times, I want to do this in a single query. This is pseudocode, I'm thinking ... SELECT department.abudget, select from the sections from each row SELECT COUNT (*) as the numbers from the classes where the segment like CONCAT ( '% Any ideas?'

ex> select Join D.Bagent, COUNT (*) numbers D. Inner Course Sea on C. Sections such as Concrete (D.Abet, "%") Group by D. B.F.



perl - Include parent node using XML::Parser -


I am trying to modify a Perl script that I found online which uses XML :: Parser Which identifies specific elements of XML documents and many times that each element contains a Pearl script and its documentation can be found:

  Use strict; Use warnings; Use XML :: Parser; File :: Use Search; @rgv or die "Usage: xmlales dir [dir ...] \ n"; My% element_count; My $ parser = xml :: parser-> new (handlers = & gt; {start = & gt; & amp; start_element;}); Search & amp; Process_xml, @ARGV; Print "$ _ ($ element_count {$ _}) \ n"% element_count for the ordered key; Go out; Sub process_xml {$ parser-> parsefile ($ _) if substr ($ _, -4) eq '.xml' and -f; } Sub start_element {my ($ expat, $ element, @attrval) = @_; $ Element_count {$ element} ++; }   

Generates an output like this:

  account (15614) account_NO (15504) active (15614) activity (6658) address (280 98)   

My question is how can I include the original node in the output?

The name of the parent node is given by current_element , such that < Code> $ name = $ expat- & gt; Current_element '/' $ Element and voilÃ! If you want to avoid warnings for empty parents' names, then my $ parent = $ expat- & gt; Current_element || ''; $ Name = "$ parent / $ element";

Then the handler gets this:

  sub start_element {my ($ expat, $ element, @ Attrval) = @_; My $ root = $ expat- & gt; Current_emment || ''; My $ name = "$ parent / $ element"; $ Element_count {$ name} ++; }    

javascript - Cannot get onclick function to run from within jQuery Ajax success function -


मेरे पास निम्न कोड है:

  & lt; script & gt; $ ( 'दस्तावेज़') तैयार (function () {$ ( '# बटन') पर क्लिक करें (समारोह () {var सड़क = document.getElementById ( "सड़क") मूल्य, $ .ajax ({डेटाप्रकार:।।। "Json ", यूआरएल:" {{url}} & amp; {{qstring}} ", डेटा: {सड़क: सड़क}, crossdomain: सच है, सफलता: समारोह (प्रतिक्रिया) {समारोह myfunction () {चेतावनी (" myfunction "); } $ ( '# data_box') एचटीएमएल ( '& lt; h3 & gt; एक मिलान सड़क पर & lt उठाओ; / h3 & gt;');। $ .प्रत्येक (प्रतिक्रिया, समारोह (कुंजी, मूल्य) {var स्ट्रिंग = स्ट्रिंग (मूल्य); $ ( '#data_box') संलग्न ( "& lt; a href = '#' onlick = 'myfunction ();' & gt;" + value.full_street_name + "& lt; / a & gt; पता श्रेणी:"। + value.min_address + "- "+ Value.max_address +" & lt; / br & gt; ");});}});});}); & Lt; / स्क्रिप्ट & gt;   

... और एक div अनुभाग जहां डेटा प्रस्तुत किया जाएगा:

  & lt; div id = 'data_box' & gt; & Lt; / div & gt;   

रूप में एक बटन ( '#button')। क्लिक समारोह है, जो एक यूआरएल के लिए अनुरोध भेजता से चलाता है,, json डेटा वापस लाता है और "data_box में हाइपरलिंक के रूप में यह प्रस्तुत करता है इसके बाद, मैं क्या करना चाहता हूं, जब हाइपरलिंक पर क्लिक किया जाता है, मैं इसे फ़ंक्शन ट्रिगर करना चाहता हूं। मुझे उस लिंक पर एक ऑनक्लिक मिला है जो "myfunction ()" को कॉल करता है लेकिन यह कुछ भी नहीं करता। फ़ंक्शन भी हैं लेकिन कुछ भी काम नहीं कर रहा है.मैंने jQuery के बाहर सहित विभिन्न स्थानों में अपने फ़ंक्शन फ़ंक्शन को रखने का भी प्रयास किया, लेकिन यह भी काम नहीं करता।

और यह वह जगह है जहां आप स्कॉपिंग के बारे में सीखते हैं। आपने सफलता संभालडर के अंदर myfunction को परिभाषित किया है, इसलिए इसे केवल सफलता हैंडलर के अंदर से ही कहा जा सकता है। हालांकि, आपका & lt; a href = "..." & gt; विंडो क्षेत्र में रहता है (क्योंकि सफलता के हैंडलर में यह सिर्फ एक अर्थहीन पाठ स्ट्रिंग है, और अनुलग्नक कॉल एक वास्तविक एच में बदल जाती है टीएमएल तत्व जिसका केवल विंडो क्षेत्र तक पहुंच है), जो आपके myFunction फ़ंक्शन के बारे में नहीं जानता है, इसलिए अब आप ऐसे फ़ंक्शन को कॉल करने का प्रयास कर रहे हैं जो मौजूद नहीं है ।

जावास्क्रिप्ट में, सब कुछ स्कॉप्ड (यानी, "चीज़ों में दिखाई देता है") फ़ंक्शन में होते हैं। वेरिएबल्स जिसे var ... फ़ंक्शन के अंदर घोषित किया जाता है एक्स डॉन उस फ़ंक्शन एक्स के बाहर मौजूद नहीं है, और किसी फ़ंक्शन के अंदर परिभाषित फ़ंक्शन एक्स उस फ़ंक्शन के बाहर मौजूद नहीं है।

इस मामले में, आप ऐसा करना चाहते हैं, इसके बदले (ध्यान दें कि value < / Code> पहले से ही एक स्ट्रिंग है, जिसका उपयोग var स्ट्रिंग = स्ट्रिंग (मान) कोई मतलब नहीं है):

  var newElement = $ ("& lt; a href = ' # '& Gt; "+ ... +" & lt; / a & gt; ...: "+ ... +" & lt; / br & gt; "); newElement.click (myfunction); $ ( '# Data_box') संलग्न (newElement)।   

आप को छोड़कर, क्योंकि आप & lt; a href = "#" & gt; का उपयोग कर रहे हैं, और मैं 100% सुनिश्चित नहीं कर रहा हूं अपने पृष्ठ के शीर्ष पर एक लिंक सेट अप करने के लिए: & lt; a & gt; का प्रयोग न करें जब आप इसका मतलब नहीं

क्या वास्तव में चाहते हैं, यह है:

  वर newElement = $ ( "& lt; div & gt; & lt; अवधि & gt;" + ... + "से & lt; / span & gt; ...: "+ ... +" & lt; / div & gt; "); । NewElement.find ( "काल") पर क्लिक करें (myfunction); $ ( '# Data_box') संलग्न (newElement)।   

और हाँ, उसमें & lt; br & gt; अब और नहीं है ब्रेक कोड का उपयोग न करें, सीएसएस का उपयोग करें।

c# - Free Memory after ImageBrush was set to null in WPF -


My app (music player) has a feature called "Game Mode" which prevents every background function except music, and I I want some storage too for free

eg I have a background image on the base grid in my grid that I have set in that way

  BaseGrid.Background = new ImageBrush ("image");   

I did something like this in the Game Mode method

  BaseGrid.Background = null; GC.Collect ();   

But for the first time, no memory was released for the first time, when I worked for it the second time, or if I paste the message box. Show the method between Nulling and GC. Collect it also works.

So my question is to set the background as a blank asynchronous operation which takes some time and GC. The collector does not see the unused object when it is said so soon after nulling or is it another problem?

anytime you call

  gc Compiler ();   

You should call

  GC WaitForPendingFinalizer ()   

also

java - NullPointerException in JDBC -


This is JDBC code for customized connection. I am using my SQL 5 database server which is working properly. I have tried this code on net bean version 7.3. There are 3 classes

  Public class MyDbOperation {Private Static connection c; Private Static Statement St. Private Stable ResultSets Rs. Private stationary ArrayList al; Private Static Int M; Private station student student; Stable {try {class.forName ("com.mysql.jdbc.Driver"); C = DriverManager.getConnection ("jdbc: mysql: //127.0.0.1: 3306 / stp13", "root", "@ Ashish123"); Cents = c.createStatement (); } Hold (Exception E) {}} Public Fixed int getInsert throws (student) SQLException {m = st.executeUpdate ("Enter in student values" ("+ s.getRollNo () +", '"+ s.getFname ( ) + "',' '+ S.getLname () +' ',' '+ s.getEmail () +' ',' + s.getMob () + ',' + + s.getStreet () + '' , '' + S.getCity () + '') "); Return M;}}   

When I execute the code I get an error

 < Code> stp13 at java.lang.NullPointerException.MyDbOperation.getInsert (MyDbOperation.java:44) stp13.Stp13hbt.main (Stp13hbt.java:24)   

with the code that is wrong ? How to solve?

Your problem is here

  try {class .forName ("com.mysql.jdbc.Driver"); C = DriverManager.getConnection ("jdbc: mysql: //127.0.0.1: 3306 / stp13", "root", " @ Ashish123 "); cents = c.createStatement ();} hold (exception e) {}   

You do not restore or log in your exception, so it has been swallowed Change it to st then zero

  try {class.forName ("com.mysql.jdbc.Driver"); C = DriverManager.getConnection ("jdbc: mysql: //127.0.0.1: 3306 / stp13", "root", "@ Ashish123"); Cents = c.createStatement (); } Hold (exception e) {new ExceptionInInitializerEreror (e); }   

Your code is full of memory leaks and SQL injection opportunities. Please please please read the correct usage of JDBC.

php - codeigniter build a calculator -


I am trying to create a calculator in PHP which will go to a Codeigniter controller. I have a form in HTML that receives numbers.

  & lt ;! DOCTYPE html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Title & gt; Calculator & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form action = "calc.php" method = "post" & gt; & Lt; Input type = "text" name = "num1" & gt; & Lt; Input type = "text" name = "num2" & gt; & Lt; Input type = "text" name = "num3" & gt; & Lt; Input type = "submit" value = "calculation" & gt; & Lt ;? Php echo form_close () ;? & Gt; & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

I have a formula on which the calculator will work on which I call Have tried the layout on the PHP page.

  if (isset ($ _ POST ['value'])) {$ num1 = $ _POST ["num1"]; $ Num2 = $ _POST ["num2"]; $ Num3 = $ _POST ["num3"]; } Function Count () {$ c = $ num1 / 50; $ B = $ points 2/12; $ S = $ num3 / 5; $ P = $ c + $ b - $ s; If ($ s> 4) {$ s = 4; }} Echo $ c "+". $ B "-". $ S = "; echo $ p;   

I do not think I am doing this very right.

internet explorer 10 - IE10 console does not return line number on javascript error? -


I get this error in the console (which I do not get in Safari or Firefox)
 < Unable to retrieve code> "undefined or zero reference property 'partition'"   

but there is no line number. (First, when I got different errors in Firefox and Safari, then a line number has been reported)

Does IE do not know where it is going, it is code or does it not want to tell me is.