Posts

Showing posts from April, 2014

greatest n per group - SQL Server query to select local maximums -

I have this data, I need to get minimum $ full lines for each person. Date of date zodiac $ 123 Jun 1 Peter $ 120 Jun 5 Peter $ 123 Jun 5 Paul $ 100 Jun 1 Paul $ 220 Jun 3 Paul The result of the SQL Server query should be: $ 120 June 5 Peter $ 100 June 1 Paul class = "post- Text "itemprop =" text "> SQL Server 2005+ Edition ; Select as CTE (select amount, [Date], name, ROW_NUMBER (), (Order number [quantity] by the participant] AS RowNum from the table * Select from CTE where Row name = 1 Alternate versions SELECT t zodiac, t. [Date], T. Name in the table (name of the selection, the least amount of name by the table group as the minimum), in the table T at INNER. Name = m.Name and t.Amount = m.Amount

java - How to make a jar file? -

How do I create a jar file from both the command line and Netbeans 6.7? command usage: jar cf file file input file (S) Using: Packaging & gt; Jar & lt; / Packaging & gt; Using : & lt; Jar destfile = "$ {dist} /lib/app.jar" basedir = "$ {build} / class" />

tfs - How do you actually use Visual Studio Team System database projects to version Sql Server -

How do you want to use the Visual Studio Team System Database Project to implement version control on a SQL Server database ? It may sound too common but whatever I have found so far online has not helped me to be able to use some useful things. I have been able to find the functionality that is available for redget devices Compared to, but it certainly does not look as intuitive as your product. In order to understand how these DB projects are considered, you may be able to have a version of the database located in the Team Foundation Server (or within SQL Server) But can check the work of your local machine and then check in new changes will allow the development simultaneously to work normally for coding. Did I know the wrong way? Or is it just a complex process to setup? is related, then how do you use it to apply the changes to the staging / production server? We do not use it, we only script everything and it does not have any other file As the source puts in contr...

asp.net - How Grid paging works? -

paging is working fine, the problem is that I do not know how this works, because when I get a break A logger in Point and GetCustomers method, I found out that maximum lights and startRowIndex are always 0, 0. I have no clue why StartRowIndexParameterName, and MaximumRowsParameterName are created and how they are used if they are used in custom mode, how to enter that mode? Thanks & lt; Body & gt; & Lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; Asp: ObjectDataSource ID = "ObjectDataSource1" runat = "server" SelectCountMethod = "Calculate" SelectMethod = "GetCustomers" TypeName = "Pilots.BLL.Customer" & gt; & Lt; SelectParameters & gt; & Lt; ASP: parameter name = "max rao" type = "int 32" /> & Lt; Asp: parameter name = "startRowIndex" type = "int32" /> & Lt; / SelectParameters & gt; ...

c++ - LoadString, static library and executables -

My project is set up, so all framework codes and modules are fixed. (Let us use it in the Framework.lib ), and many test project frameworks. Use Lib and compile executable files. To deal with the error, I am trying to insert the resource string in the framework.rc ( framework.lib project part) and load Do the wire in executable files. However, LoadString () just fails > GetLastError () / using FormatMessage () I get the following message: "The specified resource type can not be found in the image file." How do I call LoadString , which gives 0 s: four szString [256]; Int iNbOfChars = LoadString (GetModuleHandle (NULL), iStringID, szString, 256); Can I fail because the resource is not defined in the app, but in Lib? If so, can I have a centralized resource file for any suggestions? Static Libraries are only consultation OBJ files - they do not have resources like resources to do this. Need to be put in DLL.

xml - querying data from Sharepoint using Report Builder 2.0: missing fields -

I am using SQL Server 2008 with Report Builder 2.0, as mentioned in the data from a SharePoint list The report has been established to query and use an XML data source with query string set on query http: //mySharepointSite/_vti_bin/lists.asmx . However, I do not think all the fields from the Sharepoint list, even if I specify a view in which particular fields which I want and now no matter how I manipulate the query, let me either either Release field or theme field is available, but not both at the same time. This is my query because it is just right: & lt; Query & gt; Soap Action & gt; Http: //schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction& gt; & Lt; Method namespace = "http://schemas.microsoft.com/sharepoint/soap/" name = "GetListItems" & gt; & Lt; Parameter & gt; & Lt; Parameter name = "list name" & gt; & Lt; DefaultValue & gt; {8529D70B-D632-4CC8-A1E7-2C25F29BE1E0} & lt;...

jQuery $.post problem with emails -

I am trying to post form data in a lightbox via jQuery and php. There are only 3 field values ​​that I have to pass. I did not receive any errors while submitting, but not sending email. I'm seeing (via firebug) email addresses that are being entered in a text box (which are the addresses that send email addresses) instead of '@' being sent '% 40'. Has anyone experienced this or know why / how to fix this issue? My jQuery function is as follows: $ ('Notify form'). Submit (function () {$ .post ('path / to / action / to / send / email', {id: $ ("# id"). Val (), client_reviews: $ ("# client_reviewers"). (), Client_reviewers_msg: $ ("#client_reviewers_msg") .val ()}, function () {tb_remove (); $ ('# client_reviewers'). Val (''); $ ('# client_reviewers_msg'). Val ( '');}); Return false; }); Thank you in advance for any help What are you looking at. Basically, @ is a special...

Powershell match a single string against multiple regexs? -

Is there a more 'powerwelli' way to match with any one string than any other Reggae collections / collections in return? What I really want to be able to do is it's something $ databases. Names - Include $ ResexAir The way Powerwell works It seems that there should be a better solution than typing a function to iterate over the array will accept an array of string regex patterns: select - string $ IncludeRegexArray -inp $ database.Name

php - What is the name of this Checksum Algorithm? -

Do anyone know the formal / official name of the checksum algorithm used in the following functions? function checksum ($ number, $ encod = true) {if ($ encoded === true) {$ result = 0; $ Number = str_split ($ number, 1); Forex Currency ($ number $ value) {$ result = ($ result + command ($ value) - 48) * 10% 97; } Return implode ('', $ number). Sprint ('% 02u', (98 - $ result * 10% 97)% 97); } And if ($ number === checksum (substrate ($ number, 0, -2) is true)) {return substr ($ number, 0, -2); } return false; } function ifMB ($ unit, $ reference, $ amount = 0.00) {$ stack = 923; $ Weight = array (62, 45, 53, 15, 50, 5, 49, 34, 81, 76, 27, 9, 9, 30, 3); $ Argument = str_split (sprintf ('% 03u% 04u% 08u', $ unit, $ reference, round ($ amount * 100)), 1); Forex currency ($ argument = $ gt; $ value as the $ key) {$ stack + = $ value * $ weight [$ key]; } Return Sprint ('% 03u% 04u% 02u', $ unit, $ reference, 98 - ($ stack% 97)); } Than...

php - Matching SRC attribute of IMG tag using preg_match -

I am trying to run Preg_match to remove the SRC attribute in the first IMG tag (in this case , Archived $ line-> Intotext). preg_match ('/ \ & lt; * [img] [^ \ & gt;] * [src] * = * [\ "\'] {0, 1} ([^ \ "\ '] *) / I', $ line-> exchange, $ match); ex> & lt; Img src = "Pictures / Stories / OtaQuJua 1.jpg" border = "0" alt = "inside OtaQJoku's store" /> I just get it 0 Reggae should be correct, but I can not tell why it is The border appears to match the attribute and not the src attribute. Alternatively, if you have patience to read it without lingering directly on the answer field and type 'Use an HTML / XML Parser', a good tutorial can be recommended because I'm having trouble finding PHP which is applicable to PHP 4. PHP 4.4.7 Try your expression is incorrect: preg_match ('/ / lt; * img [^ & gt;] * src * = * ["\']? ([^" \ ...

Java Apache POI Excel reading exception -

I am trying to use POI to read an Excel file. This will be a large file (> 50 rows), so I'm using EventsMadeel instead of a simple user mode, which reads in full file memory. My code looks like this: file file = new file ("C: \\ bigfile.xls"); InputStream input = new FileInputStream (file); EventRecordFactory factory = New EventRecordfactory (New ERFListener) {@ Override Public Boolean Process Records (Records Rick) (Return blank;}}, Recordfinor.Gate Elknoword Record SIDS; factory.processRecords (input); but I get an exception org.apache.poi.hssf.record.RecordFormatException: Content of an Excel record can not exceed 8224 bytes This exception was fixed in 3.5, however, I am using 3.6 And I tried to pull the latest trunk from POI and still have the same problem. I have only a few rows in the attempt to reduce the file but the same error Do you have any big comments in Excel file, if so, you can try commenting after removing.

Java data type problem -

I am working with the matrix in java. (Another story :)) I want to read a CSV file and store it in a variable. I'll manipulate the values ​​then store it in a CSV file. I used STRING as the data type but if it is like 500 columns in the CSV file it hits my program speed :( I think this good data What type of data can I use to store temporary stores in long text? If my question is not clear, then please ask questions. The PS: I am reading a row and storing it in this type of variable string str; str + = reading line by CD line ; There is a loop here string for lessM = ""; (int kk = 0; kk & lt; w2.getRowDimension (); kk ++) {for (int jj = 0; jj & lt; w2.getColumnDimension (jg ++) {reduM + = Double.toString (reduceMatrix [kk] [jj]);} println ( "\ R \ n");} use a StringBuilder (or StringBuffer augue If you are using 'Java 1.5 or above): StringBuilder builder = new StringBuilder (; (For integer KK = 0;) K.K. & Lt; W2.ge...

sql - Why does SSIS Lookup task output a DT_TEXT type even though the value returned through the lookup is a VARCHAR(50)? -

P> I have a simple SSIS package that imports data from a delimited text file, does a lookup in a SQL Server table, by joining the key field (int) and using the UserName (varchar (50)) This table returns back to the table. Sample of Import File Data: Key Age 2 21 3 87 1 54 Both key and age int. Sample of lookup table: Key Username 1 Joe 2 Tom 3 Paul 4 Jack 5 Mary is key int and UserID varchar (50). When I add the Lookup box to the next step and combine them together (the matching field), the data type for the user name field is DT_TEXT Why does this happen, And what's my best way to fix or work around? I tried a data conversion component but SSIS did not complain about converting DT_TEXT to varchar (DT_STR). Did you see "Show input editor ..." (click on data stream source) and " In the input and output "tab in the output column, try to use the data type property to be converted to" string of data [DT_STR] "" lengt...

jQuery UI tabs. Reload active tab in non-ajax tab -

Loading / selecting a (non-Ajax) tab within one of the other tabs Tabs ( 'Select', 3) However, I need to be able to reload the active tab, and above the method do not work for that tab ('load', 3 ) Any ideas about how to achieve this $ ('# mytabcontainer'). > If ($ Li.hasClass ('ui-tabs-selected') & amp; amp;! O.collapsible) with If ([/ code> and add a CSS / edit the jQuery css files on the page, so that you get: div.ui-tabs ul li .ui tabs-selected one {cursor: pointer! Important;} This will change the tab so that they can always choose, even if they are already clicked. If you have this html for your tab: & Lt; div id = "tab"> One-hour Ef = "ajax / content2.html"> Ajax tab 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div id = "tabs-1" & gt; & Lt; P & gt; Prine Elite Archue & lt; / P & gt; & Lt; / D...

embedded linux - HD network media player with 100% open source buildable firmware -

I am trying to develop an application for HD Media Player, and which is a 100% open source firm build firmware. I can see that I was looking around and I think all the media players can find that they are open source, only the kernel is open advertising. The main application is usually proprietary, so they only supply sources of Linux kernel and GPL utilities. What I see is the player for which I can actually build the complete firmware. Any ideas? Look, it's Linux based, network, etc.

Is it possible to "link" two cells in Excel via some sort of formula? -

For example, I want to add content of A1 and B1 to always up to 1000. If the user type "200" in cell A1, I want B1 to be automatically updated to be "800". Similarly, if the user types "600" in the cell of "B", then I have to update the A1 to "400" automatically. I can easily do one or the other - for example I have A1 for "1000 - B1", and I want to get the second half of the behavior, but if the user type "200" To A1, then it overwrites my formula and now I have been left with numbers that do not match and do not auto update. ? Or is there the wrong tool excel? You need an alternative solution. The user has 2 cells to enter the values; And then use the second 2 cells to show the value, thus, you can use (ifblank ($ A $ 1), '' , $ 2000- $ A $ 1) in other cells (isblank ($ B $ 1), '', 2000- $ B $ 1)

animation - How can you animate in OpenGL without using the idle function glutIdleFunc()? -

In fact, apart from deactivating, what is another way to animate? pseudocode while (! Application_end) {old_time = time; Time = get_time (); Update_scene (time - old_time); Draw_scene (); Flush_output (); Sleep (1); } ... and it is the center of 99.99% serious OpenGL programs ... PS is not an open mistake, an addon on OpenGL for OST on OSPL Is the library.

Can I override the PHP built-in function echo()? -

I recently saw my source code and it was a real mess. My php source: echo & lt; H1 & gt; Rear & lt; H1 & gt; '; Echo '& lt; Span & gt; Rear & lt; / Span & gt; '; Echo & lt; P & gt; Rear & lt; / P & gt; '; And when I look up the browser source for the provided page: & Lt; Span & gt; R & lt; / Span & gt; & Lt; P & gt; Rar & lt; / P & gt; There is no way to override the echo for me so that every output ends with a new line, such as some function echo ( $ String} {echo $ string "\ r \ n"; } is not a function, but a language statement can not be defined again Could. If you want to make your output markup attractive, please note it. You can do , use the search / method of your IDE, and replace all echo with the statement Echo PHP_EOL, . This will add the OS specific newline char (s) before any output, note coma after PHP_EOL because it is important Yo...

visual c++ - How to perform Zooming with CHtmlEditCtrl in MFC -

Can someone help me do zooming on CHtmlEditCtrl? I showed my HTML document on CHtmlEditCtrl. Now I want my edit control to display the same HTML document with different zooming levels. I saw this feature in Internet Explorer 8. Now I have to add this zooming feature to my MFC app.

Selenium: Get current value from drop-down menu -

I am trying to find an easy Selenium call to catch an existing option from a select drop down list. I know that there are calls that catch all the values ​​in a list but I should know what choice is currently offered. Sorry if it is trivial but Google and Selenium IDE did not help me Thank you. You may be able to use the getSelected * commands to revert the id, index, or label The selected item should be categorized below with the selenium reference: storeSelectedId (selectLocator, variableName) Option element ID for the selected option in the specified selection element it happens. Logic: Select - An element locator identifying a drop-down menu Variable name - The name of a variable in which the result is to be stored. Returns: selected option ID in the selective selection drop-down Select from the store Select (Select Doctor , Variable name) The option selection for the selected option in the specified selection element becomes option index (startin...

c# - How to provide a default implementation for LINQ to SQL's OnValidate method? -

I am trying to implement a verification framework for the institutions in the base category. The problem I am facing is getting the OnValidate event to fire properly The reason is that OnValidate is partially marked so that I can not provide a default implementation in the base class ; This is hidden by LINQ from a new method declared by the SQL class. How can I fix this so that the OnValidate event in the base class will be automatically asked? The example code comes down from below. Public class EntityBase {public bool ISValid {get {return (GetValidationErrors (.) Calculation () == 0); }} Public Virtual IEnumerable & lt; Validation error & gt; GetValidationErrors () {yield break; } Public Zero OnValidate (System.Data.Linq.ChangeAction operation) {// Call it explicitly in derivative class unless it is never removed. If (IsValid) {stringbinder SB = New stringbilder (); Sb.AppendLine ("Avoid saving verification errors"); Agrech (validation error in GetVali...

c# - What form should i use making a website -

I'm missing out on something and need some help. In the past, I used php and mysql to make websites databases Have done Now I want to use my C # skills to build a site. This new site will be linked to the database and there will be a lot of data. Would I like to use Visual Studio to create an ASP.NET site? What is this WPF Browser application object, does it work in all browsers? Is there something else I can experiment with C #? . To begin with the new, web application ado Net (Data Access) SQL Server (DB) Up Your Most codes will be made for you and you can easily change the inconsistent person or modify it accordingly. If you want more SQL Server (Data Entry) SQL Server DB) WPF is not the next-generation Windows / desktop based application programming Web-based it provides a template for browser-based applications, but is probably limited to Internet Explorer, but not all browsers. I'm not sure about WPF, anyone can add to it as you intend to wo...

uialertview - iPhone: Is it Possible to Hide and Unhide UIACtionSheet Buttons? -

I am using FBConnect in my app. The log in action sheet button titles are titled "Log in Facebook" and "Logout Facebook", but I want to display "Login to Facebook" and "Publish on Facebook". Currently, it looks like this ... ... but I want to see it like this ... ... Probably set in these ways: - (zero) session: (FBSession *) session didLogin: (FBUID) uid {// Show button logout} - (zero ) SessionDidLogout: (FBSession *) session {// log in to the show button} response01 from the comment commentary - Warning sheet code: - (IBAction ) MySheet: (id) this {UIActionSheet * menu = [[UIActionSheet alloc] initWithTitle: @ "Facebook" Representative: self-cancelButtonTitle: @ "Cancel" DestructiveButtonTitle: otherButtonTitles shoe Somewhere: @ "Share on Facebook" @ "sign in Facebook" @ "Logot Facebook" zero]; [Menu show invoice: self See]; [Menu release]; } After Sure, just dependi...

actionscript 3 - slightly blurred text and bitmaps AFTER 3d transformation -

I have movie clips with both bitmap and text After applying some 3D changes and moving to 3D space, My text and bitmap are a little blurred. After this I am resetting all the 3D coordinates (i.e. Z = 0, rotation X = 0, rotation Y = 0) Does anyone else have to face it? Is there any solution to get my crisp text and bitmap back? You need to make sure that you clear the Matrix 3D property on any object That is what you have implemented 3D changes.

.net - Windows service deploying problem -

I have created a simple Windows service project. I created the project, setup the setup project to set it up and tutorial It is configured according to the information. I have created the setup project and installed it. In the target I can search for files so that it can be installed correctly. The service does not do anything special, it just writes a message on the startup and shutdown the event log. The problem is that I can not see my app on the Windows Service List (in the Computer / Management dialog) I can not control it. Do anyone have any ideas that I am doing wrong? If my help is helpful then my OS Win7 is 64 bit. Have you tried to install it using the installutil.exe utility (an admin console session under which)? installutil Service.exe In addition, you must add an installer component to your window service before installing it Installutil or the default window setup project. More steps are required to install Windows services, so you will need to run c...

Java to C cross compilation -

Does any good Java know about C cross compiler? Does he work well? Can you explain why you want to close your Java code in C? If this display does not show you much improvement, Java is a trash collecting language and there is currently no algorithm that can call memory allocation and delaware efficiently. Many researchers are trying to solve this problem and they have some interesting solutions, but I have not seen a good business product that can still scale in big programs. You can see the proceedings of the conference of previous conferences for more information. If you want to speed up your code, then I recommend that you use a profiler and find hot methods. Try hot methods and optimize them and if it is still not enough and use JNI.

java - Determine target URL within login page using Forms authentication with WebLogic -

I have an application running under a weblogic which is using standard form authentication. The login page is a JSP which submits the entry form which will be posted on j_security_check. So as you would expect, when a user tries to use a page but is not yet authenticated, they will be sent to login.jsp. My question is, was weblogic trying to hit them before redirecting to the login page? I want to use it to change the contents of the login page based on the user's destination. I'm not seeing anything in the request which will tell me this. You can use: weblogic.servlet.security.ServletAuthentication.getTargetURLForFormAuthentication (request.getSession ()) This is a public static method and returns the string. I have tested and it works for me

design by contract - How do I get Entity Framework to use interfaces on the generated classes? -

I have a project where the client is using the Entity Framework, and I want to remove the generated class from the rest I am trying to apply. There is an income class category and it calls the form as a property. I have created an interface that I want to apply the class like: Public Interface ICategory {string type {get; Set;}} I did it before SQL in SQL and it works fine. I am creating a partial class in a separate file and I am implementing the interface: public partial category category: iCATTAR // applicable interface However, whenever EF tries to make a query with EF, then it says that type the type > (). Example: var query = from DataContext in the c category where type == select "some type" c; Var resultsList = query.OfType & lt; ICATT & gt; (); // error here (not supported) What am I doing wrong here? By keeping in mind the other things: I am developing it in silver applications and data. The reference is being pulled from a s...

flex - Unable to refresh tree control with new branches from successful RemoteObject call -

I'm trying to populate an MX: tree component that is getting from Blazeas I OK - This folder value is an array selection of the object. I have been instructed to use Kernagram for this project. I am very new to Flex and Carnegom, according to the limited documentation which I have read online, I should populate the data with the model, so I got stuck in that orange collection. I'm trying to update the component of the tree, I think I need some methods to inform the container component for the tree that available on the data (i.e. subfolder) model is. I expected that to add subfolders as children of selected nodes, it is possible to fire a function in the container component (I can chalk it before the remote object on the model) and then fire tree.invalidateList () Tree.validateNow (). Any ideas? I found a way to do this though I'm not sure the way it is recommended. I got a command class to leave the folder VO's Array compilation for a property named ...

c# - How to check if an assembly was built using Debug or Release configuration? -

I am starting deploying my web application and I need a guarantee that all the assemblies are being deployed. Using our Release Configuration, our system will have C # /. Was developed using Net 3.5. Is there any way to achieve this? The idea is that you get the list of assembly specifications using Assembly.GetCustomAttributes () and search for DebuggableAttribute and then find out that in this specialty such as IsJITTrackingEnabled property set. Public Bull IceSandDebabild (assembly assembly) {return assembly.gate CustomAttributes (false). OFTIP & lt; DebuggableAttribute & gt; (). Select (da = & gt; da.IJJITTrackingEnabled) .FirstOrDefault (); }

.net - Overriding entity caching/change-tracking behaviour in Linq to SQL -

I think the original question might have been rotated very long with too much unnecessary details, so it My effort is simple to do I am looking for a medium to do any of the tasks given below. I need to do only one, not all. If anyone knows any of these, please answer. So, it is possible to do any of the following in SQL: A via DataContext by ExecuteQuery Remove> or ExecuteMethodCall without tracking those entities? ExecuteQuery or ExecuteMethodCall and guarantee that I always receive fresh copies of results obtained from the database, even if Only those institutions have already been recovered and they are already in the identity cache? Do not direct Linq to SQL Restrictions: Refresh method is out of question; The number of institutions is large and it will become a performance disaster. I just do not have object tracking enabled to false , because datacontax After executing it does not allow setting it back to true , and I need ...

sql server - Help finding old SQL tool that rewrote queries -

This old SQL Server device or something like this, you will enter SQL queries in it, and it I think the Quest has bought them, but I can not download a free copy of that software. Really helps you when you do not have DBA, and there are too many SQL queries to re-write. Thanks Craig A device like Gate will help - Pro version does SQL refinancing. A bell does not have to ring, and you probably have seen, but nothing is clear on the quest . Edit I think what you've found, mentioned - LECCO SQL expert Lecco's website is actually direct to search, but a 404 . LECCO SQL Expert is the only complete SQL Performance Tuning and Optimization solution to detect the problematic SQL and retype automatically SQL. With its built-in Artificial Intelligence (AI) based Feedback Search Engine, LECCO SQL expert reduces the effort required to optimize SQL and even the most junior programmer makes an expert. Developers use LECCO SQL Expert to optimize SQL during applicat...

C# Overloading Operator == and != -

I am having trouble getting the desired behavior from some of these classes and interfaces. Here's my problem, // Insert the internal methods and properties inside the unit test, the inode first node, the second node; INodeId ID = New node ID (4); First = new node (id, "node"); Second = new node (id, "node"); Assign ISRU (first == seconds); The above is failing because it is going to be the method equivalent to the object class instead of overloaded operators in the node and noded classes. If you have public interface iiDentifier & lt; T & gt; How can I get the desired behavior but any suggestions? Where T: Class {TKeyDataType GetKey & lt; TKeyDataType & gt; (); Public interface INodeId: IIdentifier & lt; INode & gt; {} Public square node: INode {INodeId ID, string} INODI {ID} name) {// Work} Public Static Bull Operator == (node ​​N1, node N2) {Return N1. Angle (N2);} Public Static Bull Operator! = (Node n1, node n2) {retu...

javascript - XSS security. Communication between 2 iframes from the same domain -

The domain abc.com contains a page with 2 iframes. Both of these domains are loaded from xyz.com. Will XSS security block JavaScript / contacts / contacts between those two iframes? As Joel says, the guardian will block access to the window as it says. You can set a communication channel between client-side scripts on separate documents / frames / windows from the same domain using cookies Write a document as a cookie Sets document.cookie for the second, reads the document.cookie on one interval polar, finds something new in it, and believes that the message. This is really annoying, as you have to get each document identified and get the signal when it is sending the message. The last resort method, in fact.

webkit - Valid CSS with new properties -

I am using some CSS tricks to promote the applicability / presence of my site in WebKit Browser. Two main ones: text-shadow and resize: none (on textures - to prevent that annoying page-breaking resize option in Safari and others). The problem is that when I run my page through the W3 validator, I get lots of: Property text-cache is not present in CSS level 2.1, But exists in: # feb4b4 1px 1px 0 # feb4b4 1px 1px 0 - and - The property size is not present in the CSS level 2.1 But it exists in: None: Is this not really valid? Am I really not supposed to use it, or is there any error in ignoring it? text-source property is a CSS3 property. If you choose CSS Level 3 from the advanced options of the W3 CSS Validator service, then it should come properly. It was also in CSS level 2, but dropped for CSS level 2.1

svn - Cloning just a particular directory with hg? -

I came from a Subversion background, but I have gradually passed for excavation My Upon launching on many projects, I will establish a development environment that was configured for a special starting point for developing app / webapp / program (originally like a Maven 2, but not necessarily Java / Maven) . Later, I will send checkout this specialty / template project through my special path outside of my SVN repo; And from the version control by the repository to Export ; So that I can work back to work in any other repository without adding the copy of the work on the template / original project basis. I have tried to do the same thing in Mercury, and I have participated in a wall because I check out , er..um..no , clone can not make a specific path from the HG repository What should I do if I want to achieve similar functionality using mercury? Use Tagged Branches? Architectures / template projects are very different, but I want to put them in the same repository...

php - Mysql_fetch_assoc(): supplied argument is not a valid MySQL result … -

संभव डुप्लिकेट: मैं जो कुछ सोच सकता था, मैंने कोशिश की, लेकिन मैं इस त्रुटि को जारी रखता हूं। Mysql_fetch_assoc (): प्रदान की गई तर्क एक मान्य MySQL परिणाम संसाधन / url / पर पंक्ति 41 पर नहीं है यदि ($ _POST [सबमिट करें] == "सबमिट करें") {$ sql = "तालिका में शामिल करें (` सामग्री`, `उपयोगकर्ता आईडी`,` टीटीएमई`) मूल्य ('$ _POST) [सामग्री] ',' '। $ User_id।' ',' ".time ()।" ') "; $ Res = mysql_query ($ sql, $ लिंक) या मर (mysql_error ()); / * (लाइन 41 निम्नलिखित है) * / जबकि ($ result = mysql_fetch_assoc ($ res)) {}} मैंने त्रुटि को छूने की कोशिश की (कोई त्रुटि केवल चेतावनी छापती है ), मैंने क्वेरी को बदलने की कोशिश की, जो कुछ मैं सोच सकता था यह कोड ठीक काम करता है - यह क्लिक पर सम्मिलित करता है, सब कुछ ठीक है, सिर्फ यह चेतावनी दिख रही है। _। ' कोई भी विचार? mysql_query () रिटर्न वैल्यू सेलेक्ट के लिए, "पोस्ट-टेक्स्ट" आइटमप्रॉप = "टेक्स्ट"> अन्य प्रकार के एसक्यूएल...

flash - SSL Client Side Certificate authentication in Adobe AIR -

I am trying to use a free web service in Adobe Air. Use the client side certificate for service authentication, thus I need to set the proof and private key used by the URLRequest of AIR / Action Script, when connected to this rental service. Is it possible to set up fixed / private key in Adobe Air? I got the ebob to connect to the SSL certificate store for Linux on AIR 1.5, but I was hoping for a platform independent solution. I could not find any way to do this (well, still not anyway). Adobe uses the built-in OS certificate store in Windows, which means that IE (and Google Chrome) use it. Follow the instructions in Only solutions that I have brought, under Linux, the links you include, and for Windows, download client certificates through the user / (And server root ca also, as we have given a self-signed certificate for the organization), then the air uses those certificates. It comes with some annoyances - As long as the user does not have root CA ins...

function - How can I estimate the logarithmic form of data points using R? -

I have data points that represent logarithmic functions. Is there a way where I can just guess the function which describes this data using R? Thank you. I think that you mean that you have vector y and x and you try to organize the function y (x) = Alog (x) . First of all, the fitting log is a bad idea, because it does not behave well. Fortunately, we have x (y) = exp (y / a) , so we can fit an exponential function which is more convenient, we can use at least sections of this non-alignment : nls (x ~ exp (y / a), start = list (a = 1.), algorithm = "port") where The initial estimate for start a a . This approach is a numerical optimization, so it can fail. In a more consistent way, it is a linear function, switching to log (x) and y / a and a straight fit using the LM : LM (log (x) ~ y)

c# - Change The Volume in System.Media.SoundPlayer -

I'm using System.Media.SoundPlayer to run some wav files in my project. Is it possible to change the volume of this SoundPlayer? If there is no way to do this, how can I change the volume of my computer using C #? There is an article on MSDN, hope it helps:

Integrating Python or Perl with PHP -

I am going to help my friend improve my phpBB board, but I want to make some things in the dragon Or Pearl. But is it possible to integrate these languages ​​with PHP? PHP is to integrate the pell.

Canceling TextBox input on validation error in WPF -

I am trying to understand how to cancel user input in a verification error textbox Happens in. If the user tries to enter an invalid character then I would like to stop it from being added to textbox . How do I accept text box invalid characters? TextBox.TextChanged Event My TextBox looks like: & lt; Textbox validation. Error = "On-Thomtextbox Formatting Error" & gt; & Lt; TextBox.Text & gt; & Lt; Binding Path = Indicate "Value" authenticationArray = "true" update source source = "property changed" & gt; & Lt; Binding.ValidationRules & gt; & Lt; Local: Some ValidationRule / & gt; & Lt; /Binding.ValidationRules> & Lt; / Binding & gt; & Lt; /TextBox.Text> & Lt; / Text box & gt; My custom verification rule looks like: Public class SomeValidationRule: Validation rules {Valid for public override validation (Object Value, CultureInfo cultureInfo) {string Hex...

java - Tomcat 6 cluster with shared objects -

We have a large cluster of Tomato servers and I find an efficient way to share a number between them I am trying. This calculation is the number of purchased "widgets" and should be checked for each pageview. Any server can meet a sales and salary increase, at which point the new value should be made available to all cluster members. We do not want to use the counting from the database because it is unnecessary to get DB for many page views and views of each page between all the updates of the cluster. We have a comprehensive memcatch cluster where we can store the value, get it on every page view, and whatever the value updates it sets the new value to the cluster. It is useless again because a page for the view of each page gets a cache. What I want to do, there is an in-memory value on each server and a multicast (or similar mechanism) message tells all servers that they have just increased and the new number is X. It appears to be the most effective because only...

c - How do I distribute a (open-source) Vala project? -

is one of the same language that is compiled for high level languages ​​such as, Wall, Something is interested to see. I wanted to start a small project with it, but I was wondering how I would distribute it. The fact is, that this C code (I think C-199) Can I distribute the C code instead of the VL code? If I do, then is C code consistent with all platforms? Or, for example, when using sockets, what is included in the appropriate content (winsock.h for Windows)? From a well developer in IRC, irc.gnome.org on #vala: 18:57 & lt; Flo & gt; It is possible to distribute the code as well as the compiler has been shipped with auto and C code. We actually use a C-library on a library, in which we are using all the advantages and disadvantages of libraries, including platform dependency.

iphone - Leftover Nav Bar in Landscape View -

I'm working to force a view into landscape mode, and to do all kinds of cool tips I have been kept in my XIB file landscape, and in my code I usually make the view controller: RedeemViewController * aViewController = [[RedeemViewController alloc] initWithNibName: @ "RedeemViewController" bundle: zero]; AViewController.hidesBottomBarWhenPushed = Yes; AViewController.wantsFullScreenLayout = Yes; [[Self-Navigation Controller] Push ViewController: Animated One Visual Controller: Yes]; Within the controller view, I fulfill the following: [[UIApplication shared application] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight]; [[Self navigation controller] Set navigation bar: Animated yes: yes]; [UIView Start Permissions: @ "View Flip" Reference: Zero]; [UIView Set Animation Duration: .75]; [UIView Set Animation Cave: UIViewAnimationCurveEaseInOut]; If (Self Interference ==UINFterfaceAuthentication Portrait) {self.view.transform = CGAffineTran...

matlab - 3D Correspondences from fundamental matrix -

In MATLAB, I have calculated using the normalized (two images) from that to the same image point in the 3D space is required. To do what I understand, I need the rotation and translation of the camera's image. The easiest way of the course will be to take the images first, but it will be a huge obstacle for my application because this extra step will be required. I mention the mention, though it seems that initial translation and rotation are required, so that I think a calibrated camera is necessary or my understanding is decreasing. So my question is how do I automatically rotate the translation / translation so that I can do the image iterated / tri-in the 3D space. Any MATLAB code or pseudocode will be fantastic. You can use the original matrix to retrieve the camera matrix 3D digits from your images Triangular However, you must know that you will be rebuilt, a projective will be rebuilt, and Euclidean will not be one. This is useful if your goal is to projective i...

javascript - Using variables in a jQuery function -

This line $ ('+ + fullId +') is giving me problems I have created an array in a different function Which gets the #ID of all inputs in the DOM. Now with this function I am trying to create a stigma and focus jQuery function. I've added the 'extreme full id' to '#' and '' 'on variable names'', but how do I work it out? $ ('' + full id + '') is not doing the trick nor $ (full id) function focusblur () {var inputId = 0 ; Var full id = 0; For (var i = 0; i div>

php mysql update statment generation from form values -

I am creating a very small database abstract layer, I want to send an array of variables obtained from a form, and an update SQL statements generate, and ultimately execute it. For example $ table name = "user" What do I put on the second row from the row given below? $ Username = $ _post ['username']; $ Password = $ _post ['password']; $ Email = $ _post ['email']; $ Array = (user name = & gt; $ user name, password = & gt; $ password, email = & gt; $ email); $ Query = "Update $ this-> TableName" $ ​​value = "form value" from the assc array as database value; $ query = "WHERE status"; You can use a foreach () loop to generate your query Note your array that you need to declare your array with the array () , and quote your co-workers. // ... $ Array = array ('username' = & gt; $ username, 'passer D = = & gt; $ password, 'email' = & gt; $ email); $ Query = ...

Expressing markup in Java XML property files: CDATA vs. escaped tags -

I am reading and writing Java property files in XML properties. HTML embedded in many asset values, which developers [[CDATA elements like: & lt; Entry key = "foo" & gt; & Lt;! Wrap in [CDATA [& lt; B & gt; Bar & lt; / B & gt; ]] & Gt; & Lt; / Entry & gt; However, when I load these properties in Java APIs and then write them in XML, it does not wrap these entries in CDATA elements, but avoid tags Is like: Are these two formats homogeneous? Am I presenting any potential problems by changing the CDATA with the escaped tag? is not equal, but by calling the text value getText () get receive. However, I would like to ask you to abandon properties that JAXB in favor of the real XML - this is great, you would love it. Nobody found good, so at least this: Object -> XML: Sun's Verbose Tutorial:

c++ - Using boost::random and getting same sequence of numbers -

मेरे पास निम्न कोड है: वर्ग बी {शून्य जनरेटर () {// यादृच्छिक संख्या जनरेटर को बढ़ावा देने :: एमटी19937 रैंडजन (स्थिर_कास्ट & lt; अहस्ताक्षरित अंतर & gt; (std :: समय (0))); को बढ़ावा देने :: normal_distribution & LT; फ्लोट & gt; शोर (0,1); Boost :: variate_generator & lt; boost :: mt19937, बढ़ावा :: सामान्य_डिस्ट्रीबंदी & lt; float & gt; & Gt; एनडी (रैंडजेन, शोर); के लिए (इंट आई = 0; आई & lt; 100; i ++) {value = nD (); // प्रत्येक मान ग्राफ}}}; क्लास ए {शून्य से कुछ फंक्शन () (के लिए (इंट आई = 1; आई & lt; = 3; i ++) {std :: shared_ptr & lt; B & gt; ख; बी। रीसेट (नया बी ()); बी & gt; जनरेटर (); }}}; मैं कई रेखांकन बनाने के लिए तेजी से उत्तराधिकार में उपरोक्त कोड को कई बार निष्पादित करना चाहता हूं। मैंने स्टैकेवरफ्लो प्रश्न की समीक्षा भी की है जो कि समान है लेकिन चेतावनी बताती है कि जब समय (0) का उपयोग किया जाता है और सदस्य फ़ंक्शन को तेजी से उत्तराधिकार में कहा जाता है तो आपको अभी भी संख्याओं की समान अनुक्रम प्राप्त होगी। क...

c - wcstombs: character encoding? -

wcstombs says, this "converts the sequence of word-character code to multibyte string". But it never says what is "broad-character" Is it inherent, as it converts utf-16 into UTF-8 or the conversion is defined by some environmental variables ? Besides, what is the common use of wcstombs? P> / code> (or LC_ALL ) uses the wchar_t between characters and multibyte characters to set the mapping category setlocale () , so you should see it in your compiler docs. For example, with MSWC you sitelokel (lc_all, ".1252"); To set the C runtime to codepage 1252 as multibyte character set. Note that MSVC docs clearly indicates that the locale for multilingual character sets can not be set to UTF-7 or UTF8: Available languages, country / region codes and codes All of the pages are included, except those code pages that are supported by the Win32 NLS API, in which each character requires more than two bytes, such as UTF-7 and UTF-8 if you ...

Updating values of custom properties in word doc using java -

I am not able to update the value of the custom property in a word document using Java. I is a word document that has a custom property with value 'stack' using java. I want to convert that value to 'overflow' I used two methods 1) Use of Apache POI I have set org.apache.poi.hpsf.CustomProperties in org.apache.poi.hpsf.DocumentSummaryInformation and written it on POIFSFileSystem. It updates the price in the custom properties table of the word but does not update the value of that related asset in the document. After the document is opened, I manually update the document Need to refresh. 2) Paste the document with four characters and use the field code of DC3, DC4 and NAC to identify the location of the custom code. a quality. Replace existing value with new value. The generated documentation now includes new values. But the problem here is that if the length of the old value and the new value are different then the document gets corrupted. I have ensured...

cocoa - Help sorting an NSArray across two properties (with NSSortDescriptor?) -

I'm a bit of a NSSortDescriptor n00b, I think, though, what I should do, this is the right tool: I have NSARR which contains objects with keys, say "name" and "time". Instead of talking about it, here's an example: Input: Name: Time B: 4C: 8B: 5C: 4A: 3C: 2A: 1A : 7B: 6 Desired output: Name: Time A: 1 & lt; --- A: 3A: 7C: 2 & lt; --- C: 4C: 8b: 4 & lt; --- B: 5b: 6 So the values ​​are sorted by "time" and are grouped by "name" first comes first because its shortest time value , And all prices for A come after each other. Then comes, he had the second smallest value of all his values. I have indicated the values ​​that determine how the names have been resolved; Each name occurs within the group, sorting time. How do I get the most efficient way to get NSA output from input? (CPU- and memory-wise, code is not required.) How do I build nssort descriptors for this, or use any other method? Unless this is the most ef...

javascript - Can a single script be used for two or more Anchor button clicks? -

There are two 'contact select anchor buttons' in my page, "id select alllink" at the top and "select allLinkB" "The bottom of the being as the id. Top scripts are working perfectly using the following script: & lt; Script type = "text / javascript" & gt; $ (Function () {$ ('# selectallLink'). (Function () {var a = []; var n = $ ("td.title_listing input: checked"); var s = ""; n .each (Function () {a.push (this.value);}); s = a.join (','); if (a.length> gt; 0) this.href = "/D_ContactSeller.aspx? Property = "+ S; else this.href = 'javascript: alert (" select at least one asset to contact! ");'; Return false;});}); Now for an anchor button below me, I tried to place it as 'select allLinkB' and changed the code like this: & lt; Script type = "text / javascript" & gt; $ (Function () {$ ('# selectallLink, selectLllBinkB) each. (Fun...

unit testing - loading fixtures for django tests -

I want to use some fixtures in my tests. I have cms_sample from inside the app and a fixtures folder: cms_sample_data.xml I have my test class functionality (probes): fixtures = ['cms_sample_data'] I TestCase of django.tests and no unittest . But the fixtures have not been loaded. What am I missing? xml- Forgot extension? Classroom performance: fixtures = ['cms_sample_data.xml']

Please check my code to add linkbutton and click event programmatcally in asp.net -

I've written the following code to create a link button programmatically, but it looks like lable at runtime, as Link is not Like link button = new link button (lnkbutton.id = "hostel club" & amp; Dr ("dshotelid") ToString () lnkbutton.Text = "HostelsClub" lnkbutton.PostBackUrl = Request.Url.ToString () lnkbutton.ToolTip = "Click here to book" AddHandler lnkbutton.Click, addressOf lnkBook_Click PHbook.Controls.Add (Lnkbutton) The problem is not with your link button for which you need to add event handler to page The link button in the init function .. This will only work ..

winforms - calling one child form from another child form in c# -

itemprop = "text"> I have 3 forms: FormA, FormB, and FormC, in which formA is the mdiParent form and Form B and C are Child Forms. I will write the following code in FormA Load Event. Private zeros frmMain_Load (Object Sender, EventArgs e) {formB.MdiParent = this; // Form B formb form c. MDPER = this is; // formC is an example of Formal Formby. Show (); } What do I do when I click on a button on the formab, then the pharmacy must be shown. Now to do this I would need to make another example of the FCCA when the button click in the formality or should I be able to use the built in forma if there is a need to make a different example Can anyone explain the reason for doing so? Edit- The answer given by Oedde makes me feel right but can I create return type of property in form [] to add more than 1 reference so that if I withdraw from Formaci from Forma If I want to go, can I use the same method? I want to pass some data from the pharmacy, so how can I do this...

c# - New static fields and hiding the public inherited members -

जिज्ञासु स्थिति: सार्वजनिक वर्ग MyTextBox: TextBox {// मैं उसी का उपयोग करना चाहता हूं सभी MyTextBoxes के लिए ऊँचाई सार्वजनिक नई स्थिर इंट ऊंचाई; } सार्वजनिक फॉर्म 1 () {इनिशियलाइजमेंट (); MyTextBox एमटीबी 1 = नया मायटेक्स्टबॉक्स (); मायटेक्स्टबॉक्स एमटीबी 2 = नया मायटेक्स्टबॉक्स (); Mtb1.Multiline = सच; Mtb2.Multiline = सच; Mtb1.Location = नया बिंदु (50, 100); Mtb2.Location = नया बिंदु (200, 100); Mtb1.Size = नया आकार (50, 50); Mtb2.Size = नया आकार (150, 150); Controls.Add (mtb1); Controls.Add (mtb2); Mtb1.Text = mtb1.Height; Mtb2.Text = mtb2.Height; // त्रुटि 1 सदस्य 'WindowsFormsApplication9.MyTextBox.Height' // किसी इंस्टेंस संदर्भ से एक्सेस नहीं किया जा सकता; // इसके बजाय एक प्रकार के नाम के साथ अर्हता प्राप्त करें} वही बात VB.NET पब्लिक क्लास मायटेक्स्टबॉक्स इनबॉक्स को टेक्स्टबॉक्स सार्वजनिक साझा छाया ऊँचाई के रूप में पूर्णांक समाप्त कक्षा एमटीबी 1। पाठ = एमटीबी 1। हाइट 'टेक्स्ट होगा "0"' चेतावनी 1 साझा सदस्य, निरंतर सदस्य, सदस्य का सदस्य या...

Dynamically creating a member ID card as pdf using PHP? -

I need a PHP script code which I need to generate a PDF file which is a member ID card (a credit Card to recognize yourself at a certain resolution). Explain to me: I have a basic form of card in PGG file format. A script will have to drop in the member's name and birthday with a serial. So far, no problem - there are so many good PHP libraries My problem is to ensure that the resultant PDF (the generated image of the card, to be accurate) meets a certain resolution (preferably 300 dpi) That's right, so it's worth printing. Any thoughts? Edit I solved it using TCPDF Library which lets you scale the images at a certain resolution. Get it here: Edit @ don need_once (dirname (__ file __). '/ Tcpdf / config / Lang / eng.php '); Need_once (dirname (__ file __) '/ tcpdf / tcpdf.php'.); // Create new PDF document $ PDF = New TCPDF (PDF, Document, PDF, PDF, PDF, Data, UTF-8 ', Incorrect); // Set Document Information $ pdf- & gt; Setci...

ruby on rails - Use nested controller or declarative authorization for admin action? -

Say, I have an app with many models: posts, blogs, toads etc and I want to send an admin to Edit, delete, post all users, blogs, todos, can I create a nested admission controller for each or use the declaratory authorization to set up an administrator account that can edit / delete user, post etc. ? I understand that it has no right to answer, I am just looking for the easiest and best way to do this. Thank you In the manner of organizing the status of your administrator, the declaration authorization Completely different. These are not a different option for the same problem. How do you authorize actions or have no relation to access control, whether your admin interface uses nested controllers and a different interface or uses the same interface as regular users with some other buttons. He said that I think what you want to ask, should take a bag on it: should your administrator interface be similar to your user interface but with some more buttons for admin tasks ? ...

Is Perl's Parse::RecDescent thread safe? -

I have a web application that uses a parser built with Pars :: Rick Denissent. In many parts of the application a parser object is required and because the parser takes very little memory, now I need to treat parsing objects as a singleton. It works well in a pure CGI environment because only one expression is parsed in the same object at the same time. I am however unsure if this will still work while moving in an environment where the same object parser is parsing more than one string. For example, if I can try to run the application under FastCGI, then this can be a problem if two requests at the same time to parse the same parser object into different strings Use? If I want to change the application then the parser will no longer be singleton, although I prefer the current solution is not straightforward. For my best knowledge, Pearl threads do not use FastCGI but processes like this Must be safe. In addition, if you are using Pearl threads and pars :: Rick Dentant, ...

ado - using TRDSConnection component in Delphi -

Someone can tell me what the use of the ADO component is. Give a small example of using it. Thanks in advance. From MS Doctor: Microsoft Remote Data Service (RDS) (HTTPS, HTTPS, or DCOM) in one of the applications. RDS was originally intended for web based customers, but you are free to choose your RDS client in any development environment or language. You can optionally apply a server-side business object to create and obtain a record set or you can use the default business object that RDS provides within your server-side components. You only need to use Internet Information Server (IIS) to host components of RDS server, if using only HTTP or HTTPS protocols, DCOM terminates IIS dependency for RSS with martial objects (recordset or otherwise) is. RDS provides customer-side caching benefits for data outcomes, updated data, and some data-aware ActiveX controls. RDS demo (up to Delphi 2007): in ... document \ rud studio \ 5.0 \ demo \ Delphi wine 32 \ VCL \ ado \ rds ...

Repository taking linq expression for filtering -

I am considering a repository refactoring, I have to improve its flexibility and reduce the count of method. Where are the following methods: Archive GetAllUsersByRole (Role Role) Users GetUserByuserName (String Username) ... The only way to get a link intent is to: Icon Gateusors (Expression E) {// Recover User Collection from Collection // Apply expression to archive and return} Is this a proper approach? Probably I have to face some of the skills because the collection of full users will need to be retrieved and filtered all the time rather than getting a subset of users according to every hard-coded criteria? EDIT: NHibernate provides ORM to my implementation. You really want to take an expression as the argument of that method. As a demonstration, it is true how far you want to go with it. The simplest method is bringing all the objects in memory and then filtering with the ingenious expression. On the other hand, you mention some types of criteria. I do not...