Posts

Showing posts from March, 2015

c# - Cannot obtain value of local or argument 'hwndSource' as it is not available at this instruction pointer -

I am playing with Interpost and I thought: "O code is something that reaches the clipboard ..." So I googled and found some article (yes I'm doing it with WPF - .NET 3.5). Although the following method triggers an error (seen in the title) and throws a stackoverflow. Private Zero Windows_SourceInitialized (Object Sender, EventArgs E) {// Hook Clipboard Base.OnSourceInitialized (e); HwndSource hwndSource = Presentation Source.frameVisual (this) as HWDSOSR; If (hwndSource! = Null) {installHandle = hwndSource.Handle; Viewer Handle = Setclipboard View (Installed Handle); HwndSource.AddHook (new HwndSourceHook (this.hwndSourceHook)); } // and hook to clipboard} I do not know (actually) what is happening there. Any thoughts? To call your issue, base.OnSourceInitialized is. When you are overriding the method, you should call the base implementation, but this is not the case here: you are handling a method, do not override a method. Since SourceInitialized

php - GET and POST on the same page? -

EDIT: The answer was found! Thanks to a lot of people, a lot of answers worked, I chose the answer to the hidden area because it was the easiest: D I am making a comment script and I have a problem. I have to use $ _POST and $ _GET on the same page, which I do not think is understandable. I am very new in PHP and I am training myself. I is a page with a view name verses.php - There is a list of verses when someone follows the answer link, then echo I am passing verseid (comment on Bible verses) in reply.php, so that a question with a verseid can be made. (This is because the user can still see the poem on which he is commenting). Now to post an answer in answer.php there is the form in it. The form goes to postrely.php This is in postReply.php $ title = $ _POST ['title']; $ Body = $ _POST ['body']; $ Verse = $ _GET [poetry]; Can I get a word from the URL and get the value from the form on the same page? If not, is this a better way? Remember,

Do different versions of Perl require different CPAN module installations? -

We have a server farm that we are slowly migrating to a new version of Perl (5.12.1) Are there. We are currently running 5.8.5. The OS will also be upgraded from RedHat 4 to RedHat 5, but RedHat 5 is still back at Pearl 5.8.8. In this way we will support two versions of Pearl for a while in our source tree. I have been told that to establish a new version of Pearl in our source tree and to use all CPAN modules at present. Actually I was asked to compile the module with the correct version of Pearl. I'm confused with this for some versions of Pearl, actually some modules do configure themselves? Given this, I think that I should configure the CPAN directory for each version of Pearl in our tree? Any information about this scenario or 'gatak'? Edit: As an additional question, does the same cpan directory (indicated by ~ / .cpan) serve both trees, or when I install different trees (module) ), Should I link to different directories? Any perl module that uses XS (co

ruby on rails - How do (or can I) hack a gem temporarily while looking for a bug? -

I have a gem in a laptop on a laptop (for example not a server) in my home directory. I have installed Ruby 1.9.1 and some other gems, especially the right ones - which allow access to Ruby with S3, etc. When doing a query on SimpleDB, all works except for a bug, and the item returned in the list contains an item with any two byte utf-8 characters in its index (s) < / P> So I look at the sources of the right prices installed on my machine, and I can see some places where I would like to test a fix. If I edit the file, save the changes, (a password is required), then restart the server (script / server), it ignores my changes I have enough New - Do you have to take effect in the source code to take the 'code' or other similar steps? I can see that the edited file is changed by looking at it in the terminal. Are you really editing the version you are applying to? If you are using bundler, it will download it in a separate folder (hidden in your home director

algorithm - sample java code for approximate string matching or boyer-moore extended for approximate string matching -

I have 1.mismatch, 2.Incation (additional played), & amp; 3. Reference to a music piece against music fragment (for example notes pitches [string values] against a reference piece of music) in the disappearance (missed notes). This is possible by exact string matching algorithms or dynamic programming / Estimated string matching algos. However, I realized that the approximate string match for my problem is more appropriate due to the removal of mismatches, insertions, notes String Mailing to support an extended version of I or Bauer-Moore. Is there a link to the sample Java code? Can I try almost string mailing? I get complex explanations and equations - but I hope I can do well with some sample codes and simple explanations. Or can I extend almost any sample java code to bayer-moore. String matching? I understand the concept of Bier-Moore, but there is a problem in adjusting it to support its approximate string matching (i.e. mismatched, entry, to support extinction). Be

javascript - Cancel the keydown in an HTML page? -

How can I cancel the key down button on the keyboard in an HTML page? Thanks This is somewhat more complicated than it has been described so far, See: You can not stop the default onkeydown in Opera. In Opera, use onkeypress instead.

c# - Create an assembly in memory -

I want to create an assembly in memory, which is the using squares in reflection. Amit Currently, I can create assembly and get it by using something like bytes AssemblyBuilder builder = AppDomain.CurrentDomain.DefineDynamicAssembly (..., AssemblyBuilderAccess.Save); ... Create assembly ... builder. Save (targetFileName); (Read the bytes from file stream ...} using the file stream fs = File.Open (targetFileName, FileMode.Open)) However, this is a local file I do not really need the file on the file, the file will be in the bytes file only. Is it possible to create an assembly without writing any files? At this point at this point it is not possible that the C # Team of the "compiler" feature as a service Planning which is expected to be included in C # 5.0.

c# 3.0 - Getting certain rows from list of rows(C#3.0) -

I have a statutable that has 44 rows I I have changed that list and the rows From the 4th row to the last (i.e. 44th) I have a program IEnumerable & LT; DataRow & gt; LstDr = dt.AsEnumerable (). Skip (4) Move (dt.ows.Count); but the output is will not return any results I am using C # 3.0 Please help Please. If you want to take everything from the fourth row, Just call T, just need to: IEnumerable & lt; DataRow & gt; LstDr = dt.AsEnumerable (). Skip (4); What is it when you talk about "output"? What do you get if you call: console WrightLine (lstDr.Count ()); ? How many rows are there in your data table to get started?

Problem, executing commands in cmd using c# -

I need to execute the command at the command prompt. C: MySQL \ MySQL Server 5.0 \ bin> mysql -uroot-popassword & lt; D: /admindb/aar.sql When I do this manually in CMD, I am getting my results. Now I am trying to do this program by executing the C # code in CMD. I'm using the code below to do this. I'm not getting any errors and results !!! When I debug, I get the value of the string command line below, "\" C: \\ MySQL \\ MySQL Server 5.0 \\ bin \\\ "-uroot -ppassword> \" D: /admindb/AAR12.sql " I think the problem is with this string, passed .. cmd it ?? solution to how to public void execute () {string Commands = "\" "+ MySqlCommandPath +" \ "" + "-u" + DbUid + "- p" + DBWW + "& gt; "+" \ "" + Path.combin (pathbackup, flankname backup + excite + ".sql"); System.Diagnostics.ProcessStartInfo PSI = New System Diagnostics. Process S

javascript - Can I use feature detection to know if css hover works for this client? -

I have a website that provides labels when a user enters the image, you can see the example on this: < / P> For the touchscreen, I want to see those signals by default (since hover is not usually available). I do not like Browser-Sniff and I try to keep that list as new devices / versions. Any reliable way to find out whether a browser can rotate or a touchscreen user detect via JavaScript or CSS? no Even if they have a touchscreen, they may be using the mouse anyway. For that matter, whether they have a touchscreen or not, they are using a keyboard (or a breath switch or something) to navigate and are still unable to hover. It is not important that the information behind the hover appears in the first place (or at least to provide other ways to access it) < / Html>

Chrome extension Page Action JS -

I am trying to create an extension using this document: Should run a part when the document is ready (load) then run. This is my manifest.json : {"name": "OwnExtension", "version": "0.1", "content_scripts ": [[" Matches ": [" https://my.site.eu/* "]," CSS ": [" styles.css "]," js ": [" Main.js "]}] } This is my main.js : Warning (10); Am I doing something wrong when nothing happens when the page loads in the browser? Warning () does not work from a content script. Try the console.log ("hello") and when you see your extension in debug mode, you should see it in the developer panel.

C++/g++: Concurrent program -

I get a C ++ program (source) that is said to work in parallel. However, if I compile it (I am using Ubuntu 10.04 and G ++ 4.4.3) with G ++ and run it, then one of my two CPU cores gets loaded while another is " Nothing "is doing. I spoke to those who gave me the program. I was told that I had to set specific flags for G ++ to get the compiled program for 2 CPU core. However, if I look at the code, then I think that there is no line that indicates parallelism. Then I have two questions: Is any C ++ - it is possible to type parallel code for internal multi-threaded applications, i.e. without any additional libraries ( Because I do not include any non-standard library)? Is it true that there are actually flags for G ++ compiler to compile the program for 2 CPU cores and compile it so that it is parallel (and if: what are they )?

java - EAR deployment failed because of Hibernate SessionFactory -

I created a Maven project that includes EJB, Web and ERR modules. But I am not using hibernate in my project. So I can not add hibernate dependencies. I successfully tested my project in JBoss 5, but when I tried to test it in jbis 4.2.3, it failed. It complains about: caused by: java.lang.ClassNotFoundException: no class loader Found: org.hibernate.SessionFactory at org.jboss.mx.loading.LoadMgr3.beginLoadTask (LoadMgr3 .java: 212) on org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl (org.jboss.mx.loading.RepositoryClassLoader.loadClass on RepositoryClassLoader.java; 21) java.lang.ClassLoader.loadClass (Clasloder .java: 248 ) Also I added the hibernate jar but did not solve the problem. I only use EJB 3.0 and write some web services. What is your suggestion?

SQL Server: error when connecting -

I'm using, attempts to connect to SQL Server for example running a dedicated database server. Here's the error that I'm getting: TCP / IP connection for the host & lt; Instance_name & gt ;, Port 1433 has failed. Error: Connection refused: Connect Is the firewall blocking my access or what? Do I dedicate a separate port for this application? Denying the error means that your connection is not Are you using Windows authentication or SQL Server login? For troubleshooting guidelines, see:

Encrypting password in compiled C or C++ code -

I know how to compile C and C ++ source files using GCC and CC in the terminal, but I would like to know whether once compiled it is safe to include passwords in these files. for example. I check user input for a specific password such as a user, but it seems that the C / C + program is compactable. Is there no way to compile a C / C ++ source file while keeping the source completely hidden? If not, by providing a short example of encrypting any input Again, check against password such as: (SHA1, MD5) Any sensitive inside code Static data is not advised to keep. You can use configuration files for that But if you really want to do this, first remember that code can easily be changed by checking it and modifying it. Only programs that the user does not have access to, they can be considered safe (for example, web sites). Most login passwords (separate sites) are not explicitly stored in the database but the encryption was encrypted with algorithms MD5, SHA1, bluffish et

declaration a @protocol in objective-c -

@protocol की घोषणा में "USING" शब्द का क्या अर्थ है? घोषणा है: @protocol नाम USING // विधियों की घोषणा @end उद्देश्य-सी में कीवर्ड का कोई कीवर्ड नहीं है। दो संभावनाएं: यह कहीं है मैक्रो के रूप में परिभाषित, उस मामले में आपको इसे अपने कोड में देखना होगा। (Xcode आपको इसके साथ मदद करता है यदि आप राइट-क्लिक का उपयोग करते हुए इस पर क्लिक करते हैं।) फ़ाइल वास्तव में उद्देश्य-सी ++ है सी ++ से आता है, लेकिन मुझे नहीं लगता है कि @protocol के संदर्भ में एक विशेष कार्यक्षमता है। इस तथ्य को देखते हुए कि यह लिखा है राजधानियों में, मैं कहूंगा कि यह एक मैक्रो है।

sql - Best way to perform a SELECT statement and insert into the same table? -

Does anyone have a suggestion to improve the following statement: ProductInfo Select (Ordrid, Product Name) 66673 with Insert (RollinLock), from ProductInfo (nolock) to FileInfoId, where ProductId = 66671 and IsEligableForCopy = 1 and ProductFileInfoId & gt; = 2768395941 and ProductFileInfoId & lt; 2768405941 It seems that time is running out because it fails to get lock Are you using DBMS? And did you try it without requesting lock? The example you presented appears to be a one-time one, but I believe that this is just an example, as opposed to some things in production.

key - construct a unique number for a string in java -

We need to read / write more than 10 million wire in a file. Apart from this, we do not want to duplicate the file, as soon as the wire is read after reading the wire, we can not keep it in memory. We can not use hash codes because duplication can be missed because of the collision in the code of humankind. Two other methods found in my Googling: Use a message digest algorithm like 1.MD5 - but it can be very expensive to calculate and store. 2. Use a checksum algorithm. [I'm not sure if it produces a unique key for string - anyone can confirm it) Is there any other approach available? Thank you. If you are fine with the risk of collision, you can use some hash function As you suggest, and rely on hash. Another alternative, possibly with a large memory footprint, (special type of tree), strings are already recognized. Update: One more option, one will have to use. However, it is still dependent on hashing, but can be adjusted to be an inevitable small possibili

C# Client Server learning -

I would like to know where I can go and more about client server C #, XML, and MS SQL Server programming To know. I am doing a lot of ASP.NET MVC, Silverlight, and many PHP / MYSQL MVC with Joomla and WordPress but I want to know more about the client server. please The list of tutorial links is given below Hope this helps, thanks, Vijay

c# - Get a message or notification when new mail form is opened? -

I need an event / message / notification that is in an Outlook addin, which opens a new mail form by a user happened? I do not know which window to open, how to fix it. You can use inspectors. NewInspector event is picked up when you open any outlook item in a new window. In this event handler for this event, you can check that Inspector Certitime type is Outlook mail and is infected in the mail item as a hacks which means that it is in a mail / mail order / compose mode.

java - Building a Monopoly Board with GridBagLayout -

I am creating a Java version of monopoly in my spare time and trying to understand some problems for swing I am Each of my places on the board is essentially a custom pocket and I am trying to keep them around the edge of a frame (like on monopoly board) . I can not find any useful explanation of how the layout system works and there is a problem in doing so. Can anyone give me an example of the point of which side frame of the frame? Should I Use A Different Layout? "post-text" itemprop = "text"> It seems to lend itself to work best with one. I recommend creating 4 JPanel S, which will include all the JButton s. Then add JPanels to border layout. North , south , east , and west . I think it might be the easiest way to layout buttons. There is a great place to start using a border layout . I just threw some code which may help you start laying it out It has not been compiled. int boardWidth; Int board light; Int BoardSquareHit

wpf - DataGrid SelectionChanged happens too often -

As I have another DataGrid Rouget template, I got a Strong effekt. If I change the selection in my inner datagrid, the selection switching method in the external grid automatically gets quiet. I do not know why, but I would like to know, what can I do against it? thx Just an estimate, but is it because choosing a selection Is a ruthless event and it just bubbles through the external datagrid? If so, to make sure that the Data Data Sender parameter is actually related to what datagrid it is related to.

javascript - Escaping Problem -

How to avoid quotation marks in HTML? My line of code is: & lt; Body onload = "setTimeout ('window.location =' http: //somepage.com '', 1000)" & gt; As you can see in the current example, two 'and one' is being used. How can I avoid them to work from above? Load content is dynamically set to the system I'm working on I @ work & lt; Body Onload = "setTimeout (function () {window.location = 'http: //somepage.com';}, 1000)" & gt; This should do your trick. To see it, it can make your JavaScript cleaner. Cheers.!

In this example where is the C++ assignment operator used rather than the copy constructor? -

As part of a continuous process of trying to upgrade my C ++ skills, I am trying to break habits. My old school C programmer tilt is to write it; Zero function (widget & ref) {widget w; // Default constructor int i; For (i = 0; i <10; i ++) {w = ref; // Assignment operator dot dot stick which modifies}} It works well but I think the following is close to the best practice; Zero function (widget & ref) {for (int i = 0; i & lt; 10; i ++) {widget w = ref; // ?? // dot dot dot dot}} With at least my widget class, it works fine. But I do not fully understand why I have two principles; 1) The copy maker runs 10 times. 2) If the copy constructor runs once, the assignment operator runs 9 times. Both of these problems seem a little bit artificial and wrong, especially 2). Is there a third possibility that I am missing? Of course the copy creator runs 10 times! When you repeat the cycle (<;>>;) for , the inside the braces on the declared varia

How to use HTC Desire and Eclipse on Ubuntu 10.4 to test Android Apps? -

If I try to use my HTC Desire, to test the app, I can develop it with Eclipse. I'm on the screen, where I can choose Emulators and connected devices, this is only listed as unknown and some question marks. I have read that on Windows you need drivers in this program HTC Sync, respectively, but how can I solve this problem on Ubuntu < Div class = "post-text" itemprop = "text"> If you have never set udev rules in Linux, then the USB connection will not work correctly. The official document contains a tutorial:

What is the abbreviation of JAVA language? -

Anyone know what is the abbreviation for the Java language? James Gosling Date: August 24, 2007 8:16: From: 58 PM PDT To: Jonathan Schwartz Subject: How was the name of Java? The story is like this: We needed a name, we were using "oak" (which was essentially selected by me randomly) , And when the team was connected to it, then the trademark lawyers put it out. We had lots of e-mail debates about the name, but nothing was solved. We ended up in a strange situation where we stopped stopping the # 1 item from shipping. Our marketing leads know someone who was "naming consultant" (I do not remember his name, but he was very good). We could not afford neither the price nor the time of a traditional product naming process. He agreed to do something strange, but effective and quick: he worked as a facilitator in a meeting where nearly a dozen people used to close themselves in the room for noon. He started asking us questions like "How do you thin

Comparing two text files in python -

I need to compare two files and redirect different lines to the third file. I use diff command I know, I can get the difference. But, is there any way to do this in dragon? Any sample code will be useful check out provide this module To compare the sequences, classes and functions can be used to compare files, for example, and can generate information about different formats, including HTML and context and unified diffs [... ] In a command-line example

audio frameworks in iPhone -

I have information about sending information about the iPhone audio system the dictation Audio Framework in the iPhone OS I know that there are 3 main audio frameworks in the iPhone OS. AVFoundation Framework CoreAudio Framework Open Framework Code> What are the supported audio formats in each of the above frameworks? I mean that all the frameworks will support all audio formats or do they support audio formats about Dependent ? Thanks For AVI Foundation, Core Eduo PLS Check the link - and this link can help you with OpenGL -

android-sdk-linux_86/platforms/android-4/tools/dx: line 77: exec: java: not found -

एंड्रॉइड-एसडीके-लिनक्स_86 / प्लेटफॉर्म्स / एंड्रॉइड -4 / टूल्स / डीएक्स: लाइन 77: एफ़: जावा: नहीं मिला < / P> मैंने नेटबीन्स 6.8 पर एंड्रॉइड प्लेटफॉर्म को कॉन्फ़िगर किया और एक एंड्रॉयड प्रोजेक्ट बनाया, समय की त्रुटि संकलित हो रही है: एंड्रॉइड-एसडीके-लिनक्स_86 / प्लेटफॉर्म्स / एंड्रॉइड -4 / टूल्स / डीएक्स: पंक्ति 77: एफ़: जावा: नहीं मिला कृपया कोई समाधान। डीएक्स को संपादित करें अपने एंड्रॉइड / उपकरण डायरेक्टरी में फ़ाइल दर्ज करें ताकि नीचे दी गई अंतिम पंक्ति के ठीक से नीचे दी जा सके: if! 'Exec जावा-संस्करण'; तो इस अतिरिक्त के साथ पैट = $ पथ: / पथ / से / जेआर / बिन फाई 2 & gt; / dev / null exec जावा $ $ जावावाच-जार्ज "$ jarpath" "$ @" निर्यात करें यह मेरे लिए काम किया है .. मुझे आशा है कि यह मदद कर सकता है ..; -)

delphi - Loading a Win32 control in C# (specifically WPF) -

I have written a set of one Win32 dlls that contains a delphi frame (see snippet 1 below), and can load them into each other. Delphi program by loading DLL and specifying correct variable (snippet 2) Now I want to be able to do the same thing in C # (I can load DLL in PNWolk, but the basic WPF 'form' can be connected to control). Snippet 1 Frame: TFrame1; Function CreateFrame (hParent: TWINControl): Integer; Stdcall; Export; Try starting frame: = TFrame1.Create (hParent); Frame.Parent: = hParent; Frame.Align: = alClient, in the end result: = 1; the ending; the ending; Export CreateFrame Name 'CreateFrame'; snippet 2 DLLHandle: = LoadLibrary ('Library /Demo.Frame.dll'); DLLHandle is, 32 then Start ReturnValue: GetProcAddress (DLLHandle, 'CreateFrame'); the ending; TS1: = TTabSheet.Create (PageControl1); Start PageControl with TS1:; Name = PageControl1: = 'tsExternal'; Caption: = 'External'; Aligned :. = AlClient; ReturnValue (TS

c# - nhibernate fluent bool to smallint mapping -

In my application I have a boolean property named DisplayConitor. This correspondence type DISPL_INand column type in the database (DB2) is small. The correspondence is as follows: [DisplayIndicator = true, DISPL_IND = 1] and [DisplayIndicator = False, DISPL_IND = 0] Is this possible by using the smallest neurbynet flunes? After the advice of France, I got to know this. I created a class that represents the NebernateNet user type, which is used for the Boolean type used in a brief type of map: Public class boolean essencecript: IUserType mapping For, I added a custom type property and now it looks like this: Map (x => x.DisplayIndicator, "DSPL_IND"). Custom type & lt; BooleanAsShortType> ();

asp.net - Remove short tag in html 4 validation using aspx -

I'm new to HTML4 assumptions, if I head run = "server" tag me Getting this error - Error Line 6, Column 82: Characters Data is Not Allowed ... Leashet "Type =" Text / CSS "Media =" All "/> In Head I have called the CSS files. So if anyone knows about thin then can help me, how to solve this error? Thanks in advance and my bu Sorry for the English ... First use it - & lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 / /" "" then this LINK & lt; href = "style / style.css" rel = "stylesheet" type = "text / css" media = "all" Try & gt; , then you will get the solution

How do I use javascript to render blue gradient color -

I need to display the text on a blue colored background inside the table. I can see how this is done using Javascript I can? Thanks a lot! You can do this with CSS if you know that your visitor supports this browsing feature Do this: There is a CSS generator on this page that allows you to make the style interactive: Here is the CSS for a blue shield: -WebKit-gradient (linear, left bottom, left top, color-stop (0.18, RGB (20,169,250)), color-stop (0.67, RGB (43,61,255)), color-stop (0.86, RGB (36,5

xslt - XSL two for-each loops for same node -

I have a problem that I want to make parents bold to round so that children get through ID Do: pid (parent id) and list them My second loop does not work. XML XSL & lt; Xsl: select & gt; & Lt; Xsl: when test = "@ PARENT_OBH_ID" & gt; & Lt; B & gt; & Lt; Xsl: Select Value = "@ TITLE" /> & Lt; / B & gt; & Lt; Xsl: each selection = "footer" & gt; - & lt; Xsl: Select Value = "@ TITLE" /> & Lt; / XSL: for-each & gt; & Lt; / XSL: When & gt; & Lt; / XSL: Select & gt; & lt; / Xsl: each -G & gt; thanks You probably use it again in templates The system on which you are using means that the reference data is confusing (you are an XSLT parser, not sure which element should read properties from within the second loop) & lt; XSL: Select & gt; & Lt; Xsl: when test = "@ PARENT_OBH_ID" & gt; & Lt; B & gt; & Lt;

ruby on rails - Simple search form passing the searched string through GET -

After submitting, I need my search form to return the following URL: / Anuncios / buscar / the_text_i_searched My form is as follows: & Lt; Div class = "basicSearch_button" & gt; & Lt; Input type = "submit" value = "BUSCAR" class = "basicSearch_buttonbutton" /> & Lt; Br / & gt; & Lt; A href = "#" onclic = "javascript: jquery ('# advance'). Modal ({obscurity: 60});" & Gt; Baskawada deprecation & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt;% end% & gt; The path to my path is for search_path: map.search '/ anuncios / buscar /: str_search' ,: admin = & gt; 'Announcements',: Action => 'Search' Well, if I want a URL in the brush manually, it will work, but of course, if you look at the form URL, : TxtSearch "parameter, which is not giving me the actual value of the text field when the form is p

iphone - Which autoresizing masks must I use within a UITabBarController? -

If the Root View Controller is a navigation controller, then tabs from the UITabBarController's docs The bar controller displays the size of the navigation content and adjusts so that it does not overlap the tab bar. Any view that you have displayed in a tab bar interface should therefore be to reset your autoresizing mask property set to look properly under any circumstances. So, if I do not use any nibb, should I use it here? UIVUtorisingFluxBibleWidth | UIViewAutoresizingFlexibleHeight

c# - I am passing a Controller as a parameter, can't get to RedirectToAction method? -

मेरी पद्धति इस तरह दिखती है: सार्वजनिक स्थिर रीडायरेक्ट रीसेट (नियंत्रक नियंत्रक, ...) {} जब मैं करता हूँ: नियंत्रक। मुझे रीडायरेक्ट टीओएक्शन नहीं मिला, कैसा आ रहा है? मुझे नियंत्रक की कार्रवाई के भीतर से पुनर्निर्देशन प्राप्त होता है, परन्तु जब मैं नियंत्रक को अन्य वर्गों के पैरामीटर के पास नहीं देता तरीका। क्यूं कर? वास्तव में भ्रमित! एक सुरक्षित फ़ंक्शन है आप इसे केवल नियंत्रक वर्ग के अंदर से कॉल कर सकते हैं।

What does "Document-oriented" vs. Key-Value mean when talking about MongoDB vs Cassandra? -

With a document-based NoSQL option, do you buy at the KV store, and vice versa? The biggest difference is that document-based databases support secondary indexes, not K / V Does. Generally speaking, document-oriented DBS allows rich queries, such as boundary questions, sorting and other types of "advanced" operations.

How to get the original value when update entity property? -

When the entity / asset is updated / modified, I can put business logic in case of change in property : partial zero OnMyPropertyChanged () {//.} Handler in this event, I know the new value and original value for MyProperty I like. The new price can be obtained by it. Myprotie How to get the original price? For example, if Oupet Myopportree is from 1 to 2, then the original value is 1, the new value is 2. this. MyProperty = 2. But how to get the original value 1? The institutions in EF2 are also implementing INotifyPropertyChanging . I do not know that it is similar in EF4. You will be able to hear the property changing event and before that the property has changed.

wcf - Missing something with Entity Framework for .NET 3.5? -

Is it not possible to create the necessary organizations when I have NK3 NSP3? I see the checkbox is disabled to support it, but it is available in Net 4. I have got a DB in which there are only tables in relation to it. I need to create a Silverlight app (SL4) which allows the management of data within this app. I can not use .NET4 on the server ... only. NET3.5SP1 Therefore, in relation to EF, some relation in EF4 is not available to me. To get back to DB from the SL4 app, to avoid building the building as a lot of plumbing to search for. Do you use Visual Studio 2010 and use the .NET Framework 3.5 in your project settings Are you If so, then I think that with the "disabled checkbox" you mean that the foreign key column in the checkbox to create a unit model from the wizard (this checkbox is not present at all in VS2008 And when VS2010 targets .NET 4.0, it is not disabled. Therefore, my theory about .NET 3.5 with VS2010.) Then, then it is relatively good news

layout - How can I make sure a ListView item always resizes to show all rows? -

I have a panel that has a TableLayoutPanel , which contains many ListViews And labels . For each list view, I want to shape it to fit all the content vertically (i.e., each row is visible). TableLayoutPanel should handle any vertical scroll but I can not work to get ListView to change the size of the rows based on the number of rows. Do I need to handle ONResize and manually resize or is it already something? > Such a question was suggested to use, but it looked like overkill for what I wanted. Instead, I made this simple overload (down) to resize on the basis of items in the list. I just tested to display in description mode on Windows Vista, but it is simple and works well. Once #pragma item-> calculates == 0) {// If there is no object present, add one so that we can use it to use - & gt; Item- & gt; Add (""); HeaderHeight = GetHeaderSize (); This- & gt; Things-> clean (); Itemhit = 0; } And {HeadHead = GetHeaderSize (); Itemhit

model view controller - How MVC (ASP.NET MVC) band 3-tier architecture can work together? -

I am writing a design document and the people of my team are ready to go from ASP.NET webform to ASP.NET . MVC It's great, but I have a hard time understanding how MVC works in a 3-level (data layer, business layer and presentation level) architecture, can we say that models, views and controllers are part of the presentation layer? Is the model of business layers part? In short, how can MVC and 3-tier architectures work together? Thanks for the help! I consider to keep ASP.NET MVC in the presentation layer. This uses the "model" class to actually see the model, which describes the data structure needed for your ideas. Your business logic and data access should remain separate from your MVC models and controllers. In addition to this, the usual "Best Practice" for MVC is to keep the controlling code as simple as possible, which usually means launching some heavy loads for the application service in your business layer. .

Passing HTML using JSON -

I am passing data using JSON for iPhone and iPad One field of data is HTML. The problem is encoding. What do I get back here: & gt; "Gadget HTML": " Hello > from Catworld & lt; img alt = \" \ "& gt; & lt; br / & gt; Src = \ "http://www.iconarchive.com/icons/flxten/finnily/128/dog-syon \ "& Gt; / & gt;", This is killing me \ N does not help. Any good way to do this? Any JSON for HTML cleanup operations? Encoding? (should be something better than manually removing) thanks This is HTML, it's just JSON encoded, use the standard JSON parser and the string you retrieve will handle the escape characters for you ... ... or what Are you trying to write your own JSON parser? (There is probably no good idea, but if you really want to change the wheel again, then imagine (and the ECMA-262 specification will probably help you to grammar)).

sql - in-memory database in Python -

I'm having some questions in Python on a large database to get some data from the database. I want to keep these data in in-store so that other programs can use them without going to a database. How do I structure them, and thinking about trying to establish some complex nested dictionaries, I realized that a good representation would be the SQL table, I would not always store the data back in the database. Want to, though. What are the in-memory implementations of SQL databases that support querying data with SQL databases? SQLite3 might work You can also supply special names: Memory: RAM for creating a database in memory implementation in Python interface . This transaction is also relatively cheap, to go based on what you are doing, just: import sqlite3 conn = sqlite3.connect (': Memory:') You can proceed as you would a regular database. Depending on your data - if you can get from key / value (strings, hash, lists, sets, sorted sets, etc.) - thi

javascript - jQuery Plugin with $.getJSON Returning undefined? -

JQuery के एक प्लगइन के अंदर मुझे बनाया है: $। GetJSON (base_url, {Agenda_id: defaults.id, क्रिया: defaults.action + defaults.Type, आउटपुट: defaults.output}, फ़ंक्शन (json) {return json;}); और एक अलग जेएस फ़ाइल में (हाँ, यह प्लग इन के बाद आता है): json = $ ('# एजेंडा-लाइव पूर्वावलोकन') .agenda ({कार्रवाई: 'प्राप्त', टाइप करें: 'एजेंडा', उत्पादन: 'json'}); चेतावनी (json [0] .agenda_id); अगर मैं ऊपर $ .getJSON करता हूं और $ .getJSON के भीतर एक चेतावनी डालता है और यह "3" देता है, जो सही है। अगर मैं इसे json = $ ('# एजेंडा-लाइव-प्रीव्यू') की तरह करता हूं। एजेंडा (...) ... यह अनिर्धारित होता है। मेरा JSON है मान्य है, और जेसन [0] .गेंडा_आईडी भी सही है, मुझे पता है कि यह एक कॉलबैक में है, तो मैं फ़ंक्शन रिटर्न में कॉलबैक के अंदर सामान कैसे प्राप्त करूं? क्योंकि एक AJAX अनुरोध डिफ़ॉल्ट रूप से अतुल्यकालिक है, अलर्ट () AJAX अनुरोध प्राप्त होने से पहले चल रहा है, और Json परिवर्तनीय इसलिए एक मान नहीं सौंपा गया है। जो भी क

c# - Best way to sign data in web form with user certificate -

We have a C # web app where users will connect using a digital certificate stored in their browsers. We have seen that from those examples, it will be easy to verify their identity when we enable SSL, as we can use the fields in the certificate, use the request. To check the client certificate, the name of the client We have been requested to sign the data sent by the user (some simple fields and a binary file) so that we can prove no doubt, the user who entered every record in our database Our first thought was to create a small text signature with the field (and if possible, MD5 of the file) and encrypt it with the private key of the certificate But ... As far as I know we can not access the private key of the certificate to sign the data, and I do not know how to sign the field in the browser What is a method, or do we have no other option to use a Java applet and if this is the latter, how do we do it (is there an open source applet that we can use? Will it be better If

forms - Rails 3 Authenticity Token -

Do anyone know how to manage authenticity tokens on Ruby 3? All Random Javascript Ruby is shown on Railway 3 articles on how HTMLMax data features are used. I do not see the authenticity token anywhere. You must put it in the body of your layout file: & Lt;% = csrf_meta_tag% & gt; & mdash; Which outputs: & lt; Meta name = "csrf-token" content = "& lt;% = form_authenticity_token%> & gt; / & Gt; & Lt; Meta name = "csrf-param" content = "authentication_token" />

php - While loop problems -

I put the following code together, the problem is that the loop is returning only one data data every time < / P> mysql_query ("SELECT date FROM" .TBL_FIXTURES. "Where compname = '$ comp_name'" date by group); $ I = 1; Echo "and lieutenant; table cell area = \" 10 \ "style = 'border: 1px dotted' width = \" 300 \ "bgcolor = \" # eeeeee \ "& gt;"; While ($ line = mysql_fetch_assoc ($ result)) {$ date = date ("FJY", $ line ['date']); Echo $ date; Echo "& lt; tr & gt; & lt; td> Stability $ i - $ date on deadlines & lt; / td & gt; & lt; / tr & gt;"; "$ Comp =" $ comp_name '' and 'Date' as per date '=' $ line [date] '';; ($ line = mysql_fetch_assoc ($ result)); $ Result = mysql_query ("SELECT * FROM" .TBL_FIXTURES. Quotation ($ line); echo "& lt; Tr & gt; & Lt; Td> $ Home_u

Returning Handmade XML from a Simple EJB -

I have created Eclipse EJB with a method that gives the string. The string is an XML piece created from the DOM document. When I call EJB as a web service, string is correct, but it is connected to CDATA tags around it. How can I avoid it and get the XML directly? Thank you @WebService (serviceName = "XService", portName = "XPort", TargetNamespace = "http://here.com/x/ejb") @Stable (name = "X", mapped name = "ezb / XJNDI") @SOAPBinding (style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use public string compile (int input) {// build builds and Returns some XML in the form of a string}}

has_one vs. defining as a Key for Embedded documents for MongoMapper and MongoDB -

स्रोत कोड है वर्ग RealTimeDetail में MongoMapper :: EmbeddedDocument key: url, String कुंजी: विधि, स्ट्रिंग एंड क्लास लक्ष्यफ़ाइड में MongoMapper :: Document key: name, String,: null = & gt; झूठी कुंजी: feed_type, स्ट्रिंग,: नाल = & gt; गलत है_ऑन: real_time_detail end जब मैं target_feed.real_time_detail = RealTimeDetail.new (: url => "",: विधि => "जाओ") I इसके बजाय मैंने TargetFeed को वर्ग TargetFeed में बदल दिया है MongoMapper :: Document key: name, String,: null = & gt; झूठी कुंजी: feed_type, स्ट्रिंग,: नाल = & gt; झूठी कुंजी: real_time_detail, realtime_detail, यह काम करता है, लेकिन यह सोच रहा था कि क्या यह इसके बारे में जाने का सबसे अच्छा तरीका है। आपकी कक्षाएं अब ActiveRecord से नहीं प्राप्त होती हैं, और has_one से संबंधित है ActiveRecord , इसलिए यह उपयोग के लिए उपलब्ध नहीं है एक स्पष्ट कुंजी का प्रयोग करना ऐसा लगता है कि यह काम करेगा।

add new column in birt report based on generated grand total column in crosstab -

Thanks for reading my questions, I need your help. I am trying to add a column based on the cross-tab's grand site. Clicking the total option for the column was added to the cross-tab. Now I want to use this total for one more calculation in my cross-tab, but it is so hard to add a column after the grand total column please thanks IME Div>

c# - Index out of range at "int msgLength = BitConverter.ToInt32(gzBuffer, 0);" -

I am currently working on some games created in C # XNA. Since I need to send a large part to Net (data 96kb), I'm using some string compressor / decompressor code, which I found on the Internet. The code looks like this: public static string short (string text) {byte [buffer = encoding.utf 8.gatebyte (text); Memorystream ms = new memorystream (); (Gzipstream zip = new gzipstream (ms, compression mode, compress, true) use (zip) .vit (buffer, 0, buffer lang);} Ms.osition = 0; memorystream outstream = new memorystream (); byte [] Compressed = new byte [ms.lamp]; ms.Read (compressed, 0; compressed lang); byte [] gzBuffer = new byte [compressed. Length = 4]; System.Buffer.BlockCopy (compressed, 0, gzBuffer, 4, Compressed.); System.Buffer.BlockCopy (BitConverter.GetBytes (Buffer Lange), 0, JizzBuffer, 0, 4); Return Convert. Tubes 64 Stri C (jizbuffer);} Public String Decompress (String Compressed Text) {Byte [gzBuffer = Convert.FromBase64String (compressedText); (MemoryStream MS

Database access in Drupal -

I am trying to customize a Drupal 6.x module. The original module does not make any calls to the database, but the customized version needs to pull some data from the database. The query should be with an AJAX call. So I'm trying to get a data provider to call, query the database, and return the results (some JSN). The data provider requires a link from the database, but I do not want to create a link in the script, but I want to get the script where the DB connection value is stored and include that file. But I have not had any success in finding the file. Where is it located in a specific Doppla establishment? P.S. I do not want to put it in the Drupal module and _ hook (), ... function to follow all the conventions. I want to make it straight forward and old school. Database settings should be in the sites /default/settings.php .

Mint Linux - Downgrade Java to 1.5 -

Currently, I'm running Mint Linux (Release 9). Java needs to downgrade from version 1.6 to 1.5, and is trying to know about how to go about it. So far, I have not had any luck. Package manager does not seem to like this. Do anyone have any suggestions? Thanks, - Chris As you have in your comments Explained, you need JDK5 because you are working on Android's source code and say: Ubuntu Linux (64-bit x86) ... Update JDK 5.0, 12 or higher. Java 6 @ override is not supported due to incompatibility. You can do this: Uninstall any Java that you receive through your Linux system's package system Install it to run JDK installer with sudo in linux / or / usr / local (for example / opt or Set your PATH environment variable to include the bin directory of JDK < / Li>

css - Need to get my divs side by side -

I am just trying to slide the image box next to the BBD logo and I can not figure it out. There is a new bit for CSS and floats, etc. Can anyone suggest ??? I am working with a template, so the CSS itself did not set up. You will need this BDD logo and Float both div with div.slideshowgallery . When both brothers walk away (for example left), they will be next to each other (if the width of the block allows it).

Is C# Random Number Generator thread safe? -

Can anyone tell me that C #Random Next () method is thread safe? There is nothing special in the next method to obtain thread protection However, this is an example method if you do not share on different threads of random , then you do not have to worry about state corruption within an example. John Skeet puts some good posts on this topic: As noted by some commentators There is another potential problem in using different instances of random , which is thread-exclusive, but they are evenly coded, and therefore gets motivated, because of pseudo-random numbers Similar scenes, because they can be made at the same time or in close proximity to each other, one way to reduce that issue is to produce a random seed And to random example (which is to use off a thread) and start a new random example for every other thread used.

Multi-line code in PHP interactive shell -

I'm learning to use PHP interactive shell, but I'm having trouble with multi-line code. Using backslashes such as Unix shells does not work. What am i doing php> function test () {\ php {echo "test"; \ Php {} \ php> testing(); PHP Parse error: syntax error, expected T_STRING in unexpected T_ECHO, php shell code on line 2 Just is not saved: php> function test () php> {PHP {resonant "test"; Php {} php> testing(); Test However, you will have problems in some cases, such as: php> if (conditional) php> {Php {// ... php {} php> Other PHP & gt; {Php {// ... php {} Thinks that before he sees the other, you get "unexpected T_ELSE" In this situation, Is nearby: php> if (conditional) php> {PHP

export to excel - Exporting WPF DataGrid to a text file in a nice looking format. Text file must be easy to read -

Is there an easy way to export a text file and a WPF DataGrid into a .csv file? I have searched something and can not see that there is a simple DataGrid method to do this. I'm getting some work using the DataGrid's item source (hardly) in my case, it's an array of strokes. I have to do something with StreamWriters and StringBuilders (details available) and basically: StringBuilder Destination = New StringBuilder (); Destination.Append (row.CreationDate); Destination.Append (separator); // Separator is '\ t' or ',' for the CSV file destination. Append (row.ProcId); Destination.Append (separator); Destination.Append (row.PartNumber); Destination.Append (separator); I do this for each straight array (in a loop). The problem is that the text file is not easy to read. The data can be of different lengths within the same column. I like to watch something: 2007-03-03 234238423823 823829923 2007-03-03 66 99 And of course, I get something: 2007-03-03 23423

php - Will running the same script multiple times with a rand() call return different values? -

मेरे पास एक स्क्रिप्ट है जो रैंड फ़ंक्शन कॉल करती है: & Lt;? Php इको रैंड (0, 9); ? & Gt; अगर मैं इस स्क्रिप्ट को कई बार चलाता हूं, तो क्या मुझे अलग संख्याएं मिल जाएंगी, या यह हमेशा एक जैसा ही होगा? दूसरे शब्दों में, PHP बीज रैंड स्वचालित रूप से करता है? संस्करण 4.2 से पहले। 0, यह हर बार एक ही मूल्य का उत्पादन करेगा; आप इसे बीज के लिए कॉल करने वाले हैं 4.2.0 से प्रारंभ करते हुए, यादृच्छिक संख्या जनरेटर स्वचालित रूप से वरीयता प्राप्त होता है (देखें), इसलिए जब भी आप स्क्रिप्ट चलाते हैं, तब आपको विभिन्न आउटपुट मिलेगा

excel - How to Trigger a Error from a VBA function -

I need to trigger an error event from the VBA function, then the function of this function can turn on the error error Go to call eg Go to Error Error: TestErr () Function Exit Afghanistan: Test = "Error Trigger" End Function Function TestErr () ?? How to trigger error here is the function thanks Err .Raise 5, "Alternate Error Source", "Alternate Error Details" MSDN Reference

arrays - How to display records below form on submission in php without the use of database? -

How to use the hidden variable as an array in order to continuously store the data so that they can display the record list Can be used for. I have a form with 4 text fields and a file upload field ... As I have submitted it, it should be added to the list which must be displayed below the form, such as That these values ​​are not stored in DB. So in this case how can I use the post array to collect data and display in the list below? You can use the hidden input field to pass the input page to the next page. Example: & lt; Form method = "post" & gt; Name: & lt; Input type = "text" name = "name []" /> & Lt; Input type = "submit" value = "add" /> & Lt ;? Php foreach ($ _POST ['name'] as the $ name) {echo '& lt; Input type = "hidden" name = "name []" value = "'. $ Name." "/> & Gt;'; }? & Gt; & Lt; / Form & gt; & Lt ;?

iphone - How much contentOffset changes in UIScrollview for zooming? -

In UIScrollview, when I scroll / drag, I have changed the ScrollView content which shows how many scrolls / Was dragged scrollview. In this way, I have updated the scrollviewsview for scrolling. However, when I zoom in ScrollView (using pinch zooming), the offset of content scrollwatch also changes. I do not understand how much content offset has changed because I can not relate the changes with the zoomscale value to know the changes in the content for zooming anyway? My intention is to get the value of the material to change while zooming (which is not because I get the material offset change due to zooming) so that I update the subview of my scrolls accordingly You can. I got stuck in here. Any help will be very much appreciated. Thanks Shaykote I have set up A small test project, and it looks like content offset is multiplied by zoomScale . So if you want to account for it, before using it, divide it with zoomScale Perhaps it is best to describe it with a sho

externalinterface - calling jQuery function from Flash -

I have a problem with IE only: if I try to open JS function from Flash using the XSI interface I can not get the result when I flash. A JQuery is embedded inside the dialog; When I make the same thing from a normal HTML page, it runs. In Flash embed code in IE OBJECT tag Should be id , else ExternalInterface will not work. I'm not sure how to add an ID for the Flash Embed tag inside the UI dialog.

about android emulator diskimage -

एमुलेटर एक डिफ़ॉल्ट उपयोगकर्ता-डेटा डिस्क छवि प्रदान करता है। स्टार्टअप पर, एमुलेटर डिफ़ॉल्ट छवि को सिस्टम उपयोगकर्ता-डेटा छवि (उपयोगकर्ता- Data.img), ऊपर वर्णित। एमिलेटर एक्टिव एडीडी की फाइलों के साथ नई इमेज को स्टोर करता है। से: 1) डिफ़ॉल्ट छवियों का क्या अर्थ है? (Userdata.img?) < Br> 2) सिस्टम उपयोगकर्ता-डेटा छवि का क्या मतलब है? (Userdata-qemu.img?) डिफ़ॉल्ट छवियां, system.img और userdata.img को आपके एसडीके स्थापना में प्रासंगिक मंच फ़ोल्डर से कॉपी किया गया है। उदाहरण के लिए इन दो छवि फ़ाइलों को $ ANDROID_HOME / प्लेटफ़ॉर्म / एंड्रॉइड -8 / छवियों से कॉपी किया जाएगा यदि आपने एंड्रॉइड 2.2 एमुलेटर बनाया है। system.img / सिस्टम विभाजन है & mdash; OS और पूर्व-स्थापित अनुप्रयोग, जबकि user-data.img में कुछ गैर-सिस्टम अनुप्रयोग शामिल हैं।

Visual Studio 2010 editions - switching from Premium (not a trial) to Ultimate trial and back again -

I have installed Video Studio 2010 Premium RTM (not a lawsuit) and would like to run the last trial of Visual Studio 2010 for one. My best idea: Do not uninstall Testing the final test Uninstall the last test Repair of premium installation the safest way to run the test in VM under VMWare / ol> or virtualbox I do not rely on different versions or levels of the same software to run well together. But I'm naturally crazy: -)

Configurability for windows application built in C# -

I am working on a Windows application that was developed in C #. I'm a bit new in the windows world, I want to restrict the number of parallel threads running for this application at any one time. This number can be changed by the user on the beefier machine, what is the best way to configure it and how it can be obtained. I can think of the following methods 1. Use the Configuration Manager to read the configuration values. If the user shows messages to Threads over NA number and gives option to modify the value of N 2. Use register entry? Thanks in advance! Sam As Andrew has said in his comment, I'm not sure that this is a good thing . However, assuming the real question that this is a per user setting, I would like to put it in the config file as a user setting, in this way you will get a default value, but if they Each user can change this if they want to see for details.

iphone - Custom drawing on top of a UITableView -

I have some problems in dragging some custom content to a UITableViewI did what I did sub-class UITableView and overwrite - (Zero) DrawRect method like this: - drawRect: (zero): (CGRect) rect {CGContextRef ctx = UIGraphicsGetCurrentContext (); [Super drawRect: rect]; CGContextSetRGBFillColor (CTX, 255, 0, 0, 1.0F); CGContextFillRect (ctx, CGRectMake (10, 10, 10, 10)); } The problem is that I see my red rectangle, but this table is below the visible cells. Even if I call [Super Direction: Rectit] in the above comment, cells will still be displayed. My guess is that any internal table which is called the drawRect method, draws cells later, which means the overlapping draw graph is not sufficient because the cells will always be prepared later. . If you need an image to cover the table, look for UIImageView as a subview form Add to Anyone can create frames for your new UIImageView and can also specify the x / y coordinate. [self.view addSubView: myView];

php - AJAX Div Retrieval every 60 seconds -

What I would like to do, it retrieves the content of a PHP file and puts it in a single div of every 60 seconds Is basically refreshing dynamic div, I have come up with the following code, though it does not seem to work to grab PHP: & Lt ;? Php $ time = date ("m / d / y h: i: bit", time ()); Mysql_query ("Update DJ Set requesttime = '{$ time}' Where Username = '{$ DJ [' Username ']}'") or Die (mysql_error ()); $ Request_db = mysql_query ("SELECT * FROM requests according to = '0' '') or die (mysql_error ()); echo" & lt; Table style = \ "border: 1px solid; width: 99%; margin-left: auto; margin-right: auto; \" border = \ "1 \" & gt; "echo" & lt; TR & gt; & Lt; Th & gt; Title & lt; / Th & gt; & Lt; Th & gt; Artist & lt; / Th & gt; & Lt; Th & gt; To dedicate ... & lt; / Th & gt; & Lt; / TR & gt; "; whi

seo - Friendly URLs with .htacces NOT working... and stackoverflow URLs style -

I know that this question has been asked millions of times over stack overflow, but I can not do it for work So I need someone who knows how to solve this problem at the end! I would like it to be inserted into the URL: http://website.com/pelicula/0221889/ http: //website.com/pelicula/ 0221889 / posters / It actually goes on: http://website.com/index.php? Ctrl = pelicula & amp; ID = 0160399 http://website.com/index.php?ctrl=pelicula&id=0160399&tab=posters This file looks like my .htacces such as: & lt; IfModule mod_rewrite.c & gt; % {REQUEST_FILENAME} on RewriteEngine RewriteCond! -f Rewrite rules ^ / ([^ /] +) / ([^ /] +) /? ([^ /] *) /? $ Index.php? Ctrl = $ 1 and id = $ 2 and tab = $ 3 [QSA, L] & lt; / IfModule & gt; But it is not working! I just get 'not found' error in my web server (only when friendly url is used, even though it is working fine regularly). How to fix this? I also want to know that any error at the end

uiview - How to achieve UIButton / UILabel 'padding' in iPhone app -

There have been many views in my iPhone application, which requires padding, such as custom UI buttons, text left the coalition , And a UILB is a background color. This may actually be a stupid question, but how can I apply 'padding' to move the text from the side to the left? I am tired of using borders etc. without any success. I know that I can make a cover view for my UILabel with a background color, but it seems that redundancy. Many thanks. I am using auto layout The solution was the UIButton 's contentEdgeInsets setting. Example Button.contentEdgeInsets = UIEdgeInsetsMake (0.0f, 30.0f, 0.0f, 30.0f);

java - How can we compute the LAST page with JPA? -

I want to start pointing the page in my service / EJB / JPA-Hibernate project, but I can not understand this How do I get a page from the query and I should know what is the number of pages I use setFirstResult (int first); SetMaxResults (max max); And it's working fine, but how do I know how many pages will I have in the total? (Hibernate is my JApA provider, but JPA only if possible) UPDATE: COUNT () looks better / easier solution; But what is the cost of SELECT COUNT (*) FROM ... compared to executeQuery ("SELECT * FROM ...). GetListResult (). Size () ? AFAIK, you need to either count (1) or (2) complete hit list and pages The number of times is the count of total count / page size. There are several methods of counting, like using a COUNT (*) < Code> query query = em.createQuery ("use employee SELECT COUNT (emp.empName)"); or any other on Using projection Standards.Setprocessing (projection.orcount ()); int rowCount = (intege

c# - Background Worker Check For When It's Midnight? -

I want to create a background worker for a WinForm that triggers code until it rolls in midnight. I have an idea to do this, but I'm pretty sure that this is not the best way to do it. while (1 == 1) {// if Datetime.Now == Midnight, execute code // sleep (1 second)} Use a System.Timers.Timer and start the application simply by DateTime.Now and DateTime.Today.AddDays (0) . Then set the gap for that amount. I actually did something like this: Public stable class DayChangedNotifier {Private stationary timer timer; Static DayChangedNotifier () {Timer = New Timer (GetSleepTime ()); Timer Elapsed + = (O, E) = & gt; {Started chained (datetime.now.DayOfWeek); Timer.Interval = this.GetSleepTime (); }; Timer.start (); SystemEvents.TimeChanged + = New Event Handler (SystemEvents_TimeChanged); } Private Static Zero SystemEvents_TimeChanged (Object Sender, EventArgs e) {timer.Interval = GetSleepTime (); } Private Static Double GetSleepTime () {var midnightTonight =

c# - Random number in a loop -

इस सवाल का पहले से ही एक उत्तर है: < / P> 9 जवाब एक समस्या के साथ यादृच्छिक संख्या उत्पन्न एक पाश में थ्रेड का उपयोग करके इसके चारों ओर जा सकते हैं। नींद लेकिन एक और अधिक सुरुचिपूर्ण समाधान के बाद। के लिए ... रैंडम आर = नया रैंडम (); स्ट्रिंग + = आर। अगला (4); 11111 ... 222 ... आदि के साथ समाप्त होगा सुझाव? लूप के बाहर यादृच्छिक संख्या जनरेटर की घोषणा को स्थानांतरित करें। बेतरतीब संख्या पीढ़ी बीज मूल्य से शुरू होती है यदि वही बीज बार-बार उपयोग किया जाता है, तो संख्याओं की एक ही श्रृंखला उत्पन्न होती है। विभिन्न दृश्यों का उत्पादन करने का एक तरीका बीज मूल्य समय पर निर्भर करना है, जिससे रैंडम के प्रत्येक नए उदाहरण के साथ एक अलग श्रृंखला तैयार होती है। डिफ़ॉल्ट रूप से, रैंडम क्लास के पैरामीलेबल कन्स्ट्रक्टर सिस्टम का उपयोग अपने बीज के मूल्य को उत्पन्न करने के लिए करता है ... लूप में घोषणा करके आप तो आपका कोड बनना चाहिए: यादृच्छिक आर = नया रैंडम (); के लिए ... स्ट्रिंग + = r.Next (4);

.net - WinDbg address summary failed -

I am getting the error seeing the full memory crash dump file taken on the user machine (Windows Server 2008 SP2): < SP3). SOS and other commands appreciate working out any suggestions. Thank you, Michael I have the same problem AFAIK, this windbag This version looks like a bug, or something similar in the public system symbol used by Windbag. Now I'm using the previous version of windbg (6.11.1.404) to execute! Address.

(PHP5) Extracting a title tag and RSS feed address from HTML using PHP DOM or Regex -

I want to get title tags and RSS feed address (if any) from the given URL, but the method I used He has not worked at all yet. I have been able to get the title tag using preg_match and a regular expression, but I am not able to find RSS feed anywhere with it. ($ webcontent contains html I have copied my code below for reference ... ` // Get the title tag preg_match ('@ (. *) @ I', $ webcontent, $ titleTagArray); // If the title tag is found, it assigns a variable ($ TitleTagArray & amp; $ titleTagArray [3]) $ webTitle = $ headline tagArere [3]; link ("(*)." (*) Rel = "optional" (*) href = *) Type = "application / rss + xml"; // RSS or Atom feed address preg_match ('get!! & Lt ... \ s / & gt; @i', $ webcontent, $ feedAddrArray); // if feed Address has been found, it is a Variable ($ feedAddrArray & amp; $ feedAddrArray [2]) $ webFeedAddr = $ feedAddrArray [2]; ` I was reading here that regular Is not the be

math - python geometry help -

I have the following problem, I am trying to find the following distance (F1 and F2): This is like me: def FindArrow (auto, X1, Y1, X2, Y2, X3, Y3): self.X1 = float (x1) self.Y1 = float (Y1) self.x2 = float (x2) self. Y2 = float (Y2) self.x3 = float (x3) self. Y3 = Float (Y3) # Circles Centers Cord Self AxC = nobody is yourself Y.C. = None # RDS itself R = None # F1 and F2 self. Fb = none. Self.fbc = none # check if coordinates parallel invalide = self.x1 * (self.Y2 - self.Y3) + self.x2 * (self Y3 - Y1) + self. X3 * (self. Y1 - self. Y2) if (invalide == 0): return # get the properties of the center of the circle = (0.5 * ((self.x2 - self x3) * (self. X1 - Self.x3) - (Yoga itself - Y3) * (Yep. Y3 - Y1 itself)) / assimilate self. Xc = 0.5 * (self. X1 + self. X2) + s * (self Y2 - Y1) Self. YC = 0.5 * (self. Y1 + self. Y2) + S * (self.X1 - self.X2) # Get radius self. R = Math SQL (math.pow (self.xc-self.x1, 2) + math.pow (self.Yc-self.Y1, 2)) As long as everything here works Lo

Error adding a service refererence to Visual Studio via WSDL -

I have been given a WSDL with all method requests and responses, and I need to use all to create all the items Some web methods will be I have successfully added WSDL as a "Service Reference" and I can see the methods and structures and can instantiate them. All this seems to be there but, I have a problem: I will not build the project after adding WSDL Here I get the error message when Visual Studio is Reference.cs : < Blockquote> tries to compile "Error 2 type name 'ServiceReference1' is missing in type 'WSPELab.WSPELab' C: \ Users \ JJ \ Documents \ Visual Studio 2008 \ Projects \ WSPELab \ WSPELab \ Service Reference \ ServiceReference1 \ Reference.cs 21 111 WSPELabSLN Is it possible that I have a namespace error in my part The reason is getting this error message? Finally, an additional question: Added to the WSDL, can I use it directly on the structures? Or are they "listings" for me to apply To do? A WSDL is a mac

Maximum number of concurrent users connected to SQL Server 2008 -

Is the maximum number of concurrent users connected to SQL Server 2008? I'm guessing computer resources that determine the boundary (if it exists), but I'm wondering if there is a theoretical limit I have tried to googling the answer, but all the information I found is pre-SQL Server Is based on versions. If there is a limit, does it only apply to a database or a SQL Server instance? user connection: 32767