Posts

Showing posts from September, 2014

install - Programatically installing font in Windows -

What is the trick to copy a font file to the fonts directory and then after the reboot is added using AddFontResource ? On this page it is to say: this function only fonts When the current session restarts the system, the font will not be present. After restarting the system, to install the font, the font should be listed in the registry. / Html>

windows - C# - Detect time of last user interaction with the OS -

I am writing a small tray application that requires users to find the last time with their machine Whether they're 'useless again' Is there a way for a user to take the time to move his mouse for the last time, hit the key or interact with his machine in any way? I understand that the windows clearly track this to show that the screen saver or power down etc., so I believe that it is a Windows to recover itself Is the API? Documented on .

c# main method ignores string variables -

I have been given a small # project to write, which basically has to wrap some DLS in the console application. I have seen it as a strange problem. I have announced some local variables within the main method to use. The idea is that when the arguments are parsed, these values ​​are kept in these variables (the arguments are the main ones like -U: usernames). Below is the code that I am using to start the process. . Nameshot ziptogo {public class ZipToGo {public static zero main (string [] args) {string user = null; Int divide = 0; String mysqlServer = null; String mysqlName = null; String mysqlUser = null; String mysqlPwd = null; String barcode = null; Boole zipped = false; Zipatogo zipong = new zip code (); If (args.Length == 0) {ziptogo.usage (); } // We see the debate and remove the values. For (int i = 0; i & lt; args.Length; i ++) {string [] value = ziptogo.getArgValue (args [i]); If (value [0]. Acquires ("- u") || Value [0]. Ecloss ("- u")) {us

.net - Logout or signout problem in asp.net c# using Master page and windows authentication -

I'm new to asp.net, using my problem master page and window authentication while experiencing logout problem in myappication If I use the browser back button after signing out of my application, it goes back to the signed page again, after which I click on any control, only goes back to the logout step, but I unknowingly logged in page I do not want to show. I am using href, document.location.replace (page), response.write ("mypage.aspx"), this technique for shipping purpose and I use sessions in all pages I am here. Note: I am using log and logout in the main page ... so if I check the session for a blank redirect on the home page which is also a page, then I can see the home page I am not able to login myself because there is infinite looping. When I am searching I have got some coding to clear the cache, but IA is facing the problem, after which I have logged in and navigated on some pages, then I am clicking on the browser backbutt without signing out. Refre

asp.net - Is it possible to get the type of a .Net object using javascript? -

I have ASP A web application is written using Net MVC. One function of the application is to return a list of objects on the web page using JSN, although these items are of various types, how can I determine the types of these items using javascript? Javascript does not have any type of object type. If you need to run some type of logic client-side, then add a property returning type name to your object, then see it in JS.

Reengineer SQL into SubSonic LINQ -

I have 11 records in the menu table, 1 with only one page ID set, though I < Code> var test = Menu.All () Where (x = & gt; x.WebPages.Any (pages = & gt; pages.Roles.Contains (roles.GETRolesForUser () [0]) As I run SQL See 11 records SELECT [t0]. [Category ID], [T.]. [Created], [T.]. [Created], [T0]. [ID] [T.]. [ImageID], [T.]. [ImageEdware], [T.]. [Locale], [T.]. [Modified BI], [T.]. [Modified], [ T] [Audi], [T.]. [PageID], [T.]. [Parent ID], [T]. [Title], [T.]. [URL], [T.]. [Visible ] FOR [DBO]. [Menu] AS Where T is present (SELECT NULL FROM [dbo]. [Webpage] AS T1 WHERE ([T1]. [Roles] '%' + 'User' + '%')) If I run it, then I get 1 record var test = menu. All () where (x => x.WebPages.Any (pages => gt; & gt; ; Pages.Roles. (Rolls. Gatorolforces () [0]) and pages.ID == x.PageID); S [class]] [T.]. [Created], [T.]. [Image ID], [T.]. [ImageHouse], [T.]. [Locale], [T.]. [Modified], [T.] [Modified], [T.] [Order id], [t] [[O

Send a structure through a socket using tpl for serialization using c -

After reading some related questions, I have decided to use it to sort my structures so that they have chairs Can get it by sending. I am having trouble understanding how to send and receive TPL images through sockets. When I call the tpl_dump function, I get a graphical error on the server side. I know that the chairs are working on both sides because I wanted to send the code back and forth first. I was able to create a tpl image on the client without any problem and even use tpl to read. It is not the structure that I want to send back and forth, but I hope to understand this, so sample out so that I can do this in the future. I know that I have some mismatch between incoming buffer and tpl_dump . I am still learning (According to my previous questions) I apologize if there are errors in my code. Edit Nicolae said that the issues have been corrected in the code below Customer code: P> tpl_node * tn; Zero * edit; Size_t lane; Struct ci {char c; Int i; }; Str

Calling VBScript from Javascript -

I have seen the related post on it, but it is only inline VBSScript for on-twentyover events when calling the Javascript function Uses onclick for What is a way to call a VBScript sub for the onClick event from a button that uses JavaScript onmouseover and onmouseout events? Currently when I try I get an error that the object does not support property or method. It is possible, but you have to prefix all your script calls in HTML with the proper language. onmouseover = "javascript: vbfunction ();" If there are script calls that are not prefixes, then you may get errors on the page because the parser They do not know how the scripting language is being used.

forms authentication - FBA based SharePoint Application Backup restore -

Does any SharePoint Web application try to use Form Based Authentication (FBA) on another SharePoint server? We are facing some issues: the restoration of FBA based SharePoint web applications: We have a server where we created a web application based on FBA It has an FBA database in We have backed up the FBA database on the new server. We have tried to back up the web application and restore it to a new server. We changed the authentication settings and the web for the FBA. Conflict entries changed. Upon reaching the site, I was able to log on to the site and was watching all the content. But when I use this function in the object model, it always lies on which user I log in: SPContext.Current.Web.DoesUserHavePermissions (SPContext.Current.Web.RoleDefinitions ["Read"] .base parameter) ostring () Before such issues Have been faced? Has anyone tried to back up an FBA based web application? We have restored a separate farm that lives in a differe

c# - What's the best way of creation of thousands of controls in scrollable area using WPF -

I am using WPF and C #. I have a problem. I need to create many bindable template-controlled controls in the area that scrolls up (they are all types of all). For example, 1000 text boxes, 1000 drop down lists, and 1000 checkboxes. The problem is that when they are all made, then it actually works very slowly. The question is - can there be so many controls without transplants and what direction should I look for in solution? I want to save the ability to use templates, databasing and simple event handling like mouse clicking. PS I have tried many things (rendering geometry only, different base classes and so on) but the only way to work for me at present (I have not tried to do this yet ) Only to create controls that fit in the current viewport and update this list of controls on scrolling. PPS I know that 3.5 SP1 has a mechanism that is used in the list box when the list is reused during scrolling but such an approach can not be used here because it All the items are

Clojure Vector of Refs -

What is the easiest way to create a vector of different refs? Using will (repeat 5 (referrals)) return a list, but they will all refer to the same referee: user = & Gt; (Repeat 5 (ref zero)) (# & lt; ref @ 16ef71: zero> # & lt; referee @ 16ef71: zero> # & lt; ref @ 16ef71: zero & gt; # & lt; ref @ 16ef71: with zero & gt; # & lt; rfe @ 16ef71: zero & gt;) with (repeat 5 (referee zero)) one Results only: User = & gt; (Repeat 5 (referee zero)) (# & lt; ref @ 1d88db7: zero & gt; # & lt; ref @ 1d88db7: zero & gt; # & lt; referee @ 1d88db7: zero & gt; # & lt; ref @ 1d88db7: Zero & gt; # & lt; ref @ 1d88db7: Zero & gt;) User & gt; (Repeated Doctor) ------------------------- Closer.core / Frequently ([F]) Probably no arguments with side effects Does not take the function of, and gives an infinite lazy sequence to its infinite call; (Take 5 (repeated # (not equal to reference)) (#

linq - Database problem moving from VS Development Server to IIS7 -

I have a project that I am trying to move to run on IIS7 instead of Visual Studio Development Server. Everything works on the VS Development Server, but when going to IIS7 it is unable to read anything from the database, but the database does not return the error, instead it gives a NullReferenceException to the information received from the database. The project uses the link to get information from DB, if it matters, besides, here is my connection string. I have tried not to take any advantage with it. & lt; Connection Seating & gt; & Lt; Add name = "MyProjectConnectionString" connectionString = "data source = MY-PC \ SQLEXPRESS; initial catalog = MyProjectsDB; integrated security = true" provider name = "System.Data.SqlClient" /> & Lt; / ConnectionStrings & gt; System Information: IIS7 Vista Business is running on SQL Server 2008 Express, and it works fine with Visual Studio Development Server and SQL Server 2008. Thanks fo

Force PNG to download instead of opening in browser with IIS -

I need to create a subdirectory of images to download all PNG instead of opening in the browser window. I am using IIS for the web server. Is any PNG downloadable? As the other poster said, as I For response, you must add an HTTP content-dispensation header with the value of the attachment. IIS6 Select the directory with PNG files in the IIS Manager and click Open Properties dialog Click the HTTP Header tab. In the Custom HTTP Header section, click Add. Enter "attachment" in the "Custom-header value field" in the "Custom-header names" field that appears in a dialog. IIS ( Iisreset may need to be restarted for IIS7: Select the directory with PNG files in the IIS Manager and select the FEATURES VEOO . Double-click the HTTP Response Headers item and then choose the option of the add option in the menu on the right. In the "Name" field Enter "content-type". In the "Value" field, enter "Attachmen

Pulling XML Elements in C# Via an API Feed -

To demonstrate the weather condition, I am trying to pull some elements from a weather API. First of all, I'm trying to catch the name of the weather station, which is & lt; In the feed inside the IoCo> element & lt; Station>. Here is the feed XML file that I am trying to drag: I & lt; ICO> Data>? Use System.Xml.Linq , like this: < / P> XDocument.Load (@ "http://api.wunderground.com/auto/wui/geo/GeoLookupXML/index.xml?query=94107") .Root .Element ("Element ( "Airport"). Element ("Station") Element ("ICO"). Value Or, if you want to get value for all the station, < Pre> XDocument.Load (@ "http://api.wunderground.com/auto/wui/geo/GeoLookupXML/index.xml?query=94107") .Root .Element ("Element" ("Station" Select "Elements" ("Station"). (S = & gt; s.Element ("Ioco"). Value)

c# - Passing Generic List into SelectLista -

I know that you can not go into a non-IEnumerable based object in an ASP.NET MVC SelectList helper method (as It is expected that the first one for the first IEnumerable ) I have a generic list list & lt; OurCustomType & gt; and OurCustomType has properties for things like dropdown value etc. So if I can not go into the normal object for an IEnumerable, if I still want to use the SelectList assistant, what other options do I have here? IEnumerable & lt; T & gt; extension IEnumerable , hence the list & lt; T & gt; already applies to IEnumerable . it should be fine. For example: list & lt; Int & gt; General list = new list & lt; Int & gt; (); IEnumerable & LT; Integer & gt; Generic Sepenance = Generic List; IEnumerable weakSequence = generic;

Does Linq have "Difference"? -

I have a SQL statement that uses the difference => I Does in a stored proc but I want to change the LINQ that is equal to the difference in LINQ? Formerly: WHERE (c. Name, '' + + '' '')) = 4 Thanks is (AFAIK) All useful T-SQL functions like, difference, soundx, etc., etc. These are translated into functions, where their T-SQL counterparts are translated into sections given by Linux 2 SQL. Edit: Ohops, this is 4.0. Sorry about that He said, to do this, you can create a user-defined function in your database, and you can add that function to your DBML file and as soon as you were SqlMethods.Like (which I was thinking) basically you just made a UDF That takes the same input as the define and gives the same result. This function does nothing but calls define method. Then you disclose it in your DBML, and use your function in your questions.

design patterns - How to efficiently save objects to a SQL 2000 database -

In the past, whenever my application requires multiple records to be included in an SQL 2000 db, I once stored Calling Procedure While putting many records for each record, I found out that the performance was faced, especially when the fat customer called the web service to call the database. Then I came to know that if I have passed XML data while representing multiple data, then SQL 2000 can be saved in a temporary table and I use the same SQL to record the XML table. Can be processed effectively which operates in all the rows of the temporary table. This reduced the number of calls of one to the SP and it was even more efficient because the SQL update commands worked on multiple records at once. I personally want to use a business object (BO) layer and it has not been experienced with LINQ or unit framework, so for the moment, assume that these devices are out of the scope. ... In my bo layer, I will add an object to the "ToDataset" function in converting the ob

Is it sensible to connect a desktop client directly to MySQL? -

Connecting to a MySQL server (i.e. DriverManager.getConnection (databaseURL) etc), but intends to go to use a web service (once created). My question is, can not I live with the direct connection? What is the web service giving me more code for writing? I have to implement my certification; What's wrong with just relying on MySQL? (I am saying this question in negative words, because I get the idea that these days these models have been disappointed slightly, that is what I am really asking because I feel that I I want to work right.) Thanks to any insights, you can give me! Well, as long as you give the client the right access to the user, Em> wrong MySQL may be that if you are running a lot of and many customers, that will keep many MySQL connections open, while a web service is using a single connection Can handle loads from all clients and The true utility of the web service occurs when you have a lot of business logic that can not be in the databas

SAS DATE issue - calculating "NEAREST MONTH" -

I need to calculate a figure that is equal to the 'nearest' number of months between two dates. However, the standard SAS function (INTCK) is not ready to consider the day of its date parameter (for example, the code below needs to be solved for 0 when I need it 1). What is the 'fastest' way to solve this problem? data_null_; X = "01APR08" d; Y = "28APR08" d; Z = intck ('month', x, y); Put z =; Run; EDIT: Martins replies to comments. I will last up to 0 months - I do not think the range is relevant. I am trying to repeat the function (NEAREST_MONTHS) comes from DCS (Sungard Nabi Application). Help file includes the following: Category Date Description The difference between the two dates is closest Returns the number if the second date is greater than the first date, then 0 is returned SYNETS NEAREST_MONTHS (Later_Date, earlier_Date) return type integer < / P> Example NEAREST_MONTHS (date1, date2) return

asp.net - Why Session_End event not raised when StateProvider is not InProc? -

I'm asking this question with curiosity. I have seen this in my global. // P> zero session_und (object sender, eventArgse E) {// code that runs after session ends // Note: Session_End event is only lifted when sessionstate mode // to Web The config file is set to InProc. If session mode is set to StateServer // or SQLServer, then the event has not been raised. } I have to understand why session mode is not a status server or SQL Server, session / event event is not Capture / Undeveloped?

unicode - Visual Studio 2005 .vcproj files won't stay encoded as UTF-8 -

Issue: I edit a .vcproj file, save it as UTF-8 (and in the XML header Specify), and when I call it VS Opens in, next time it saves it, then returns the encoding CP-1255/1252/1251 (depending on the local settings on the machine). This has become a problem of our R & D, because whenever a person does .vcproj, the encoding changes according to their machine's configuration. How can I configure VS to use UTF-8 and stop this ANSI encoding dance back and forth? "post-text" itemprop = "text"> Cheap answer: All Dev PC has the same localized setting.

Is it possible to integrate Jquery with Eclipse? -

Is it possible to integrate jazzery with Eclipse / Myclippus? I mean, by integrating, if I am working on any JSP or HTML file and I am including jquery.js, then it should automatically start code assurance / autocomplete. Edit: If there is any other way please tell me. Try it to support jQuery 1.7 is

c# - If a method performs operations on a reference type is there any need to return it? -

If I have a method that operates especially on a reference type variable (such as a dataset) and modifies it , Then there is no need to return that variable to the method ?? For example, the following method goes through a data and trim all the values ​​within it and then returns the dataat to the caller: private datatyll TrimAladataDataTable (Datatelle DT) {foreach (Detroit Row in dt.Rows) {foreach (Datacolumn DC in dt.Columns) {Line [DC] = Line [DC] .Ostring () Trim (); }} Return DT; } Would it be better if this method is devoid of zero? This (?) Seems very nonsensical to return, but do you think it reads better if it returns the item after operating it (as it does at this time) ?? For me, when a method returns a reference type, then I hope it is a new one Be an object. I decide to withdraw it from zero. One question: Is there any reason for this method not to be a member of the DataTable class? I think that DataTable.TrimAllData () will also work better

tortoisesvn - SVN Won't download newly added files -

SVN will not download newly added files, but will update current. Developer B added 3 new files to the repo, and when the developer updates A, it does not download the file. Turtle SSVN and Visual SVN using both. Does anyone know what might be the reason for this problem? If developer goes to the Report Browser, they can see them, but they will not update their folders with updates only. From this reply: " Update the amendment .. . "Select the dialog and depth as" Completely recurring ". There may be a problem with the empty folder.

jQuery and Safari 4.0.1 - ToggleClass effect -

I am currently developing a webpage where I want to use the toggle class function from jQuery. I went to the jQuery UI website because I think this is the extension of the original jQuery. When I click on the 'Run Effect' button, nothing happens, is it just my browser or a slow computer or any of you would also like Safari Get in 4.0.1 4.0 (4530.17)? I tested in Firefox 3.0.10 and it worked, it seems that the jQuery UI is not compatible with Safari 4.0.1 4.0 (4530.17), or Just what is their performance on their site? To expand any care << p> Windows: Safari 4.0 (530.17): unsuccessful This is the case, ultimate (still) work Appears to be. If your change is not very complicated, then you can use it as your substitute.

executable - Avoid blinking when launching a .cmd file -

I was downgraded to Vista due to XP, which are not relevant. I have a very useful skipping tool which is not available in XP, so I decided to make my own. It just works fine, so I'm easy to open it. To start the CMD file easy (I did not feel like creating a .jar file) My only problem is that the command prompt screen pops up and disappears by giving unpleasant impressions. This is: start java-classpath lib \ myutil.jar echo; Square recortes. Main Is there a way to run just without blinking orders? (Other than creating .jar file?) edit I have followed Jeffery's advice to me. The CMD file had a shortcut, now the shortcut itself is: "C: \ Archivos de programa \ Java \ jre6 \ bin \ javaw.exe" -classpath lib Get started: c: \ user \ oreyes \ recortes and just works fine! Thanks Create a shortcut (.lnk) file containing the argument with executables The paths include. For information on how to do this from a script.

c# - Stacking and delaying multiple UI change notifications -

Does a code handle such a scenario? User typing something in the input field, rich text box). Due to this, many text-playful events start to fire. Do anyone have a clean C # snippet to do this? Five (or whatever) Create a timer , and, your TextChanged event, stop the timer and start it again. After that, move your handler code to the tick event on the timer.

java - Strange Blackberry Issue - New Build Suddenly Requesting Permission Access -

During my app development test, I'm running on a strange issue where the new uniform build code (create 2.0) Description - The same code base So there are two builds, the same code base with both. Build 1.0 was created last week / signed. Build 2.0 was created / signed yesterday. If I install Build 1.0, no problems with initial permissions (Allow All). But the same permission (carrier Internet, GPS) is set to the prompt at the install of Build 2.0. Question AP GPS & amp; Data requests and I understand that permission to set up some phone configurations requires permission, but a build why the permissions (build 1.0) was not required, suddenly requires 2.0 (Build 2.0)? I think this may be with my project / build settings but I'm not sure what happened is there any suggestions? Is it possible that you did something between 1.0 and 2.0 on your device which caused this , Like running your firewall? As far as I know, you can not do anything when setting, s

javascript - Breaking out of a PrototypeJS .each() loop -

In this highly customized example, I have an array with 3 elements, which I'm looping when using the method I am var vals = $ w ('foo barfish'); Vals.each (function (val) {alert (val); if (val == 'bar') {// This function exits (val) //, but still continues with .each () returns ;}}); I can easily return the function being called by .each () . My question is, how can I eliminate .each () loop from within the strong> function? Calling .each ()? if (val == 'bar') {$ break; } This is documented on the same page linked to you. This is an exception specifically controlled by each function. When thrown, it prevents your function from calling on other elements.

code signing - SignTool Error: ISignedCode::Sign returned error: 0x80092006 -

I am signing an EXE program with a certificate issued by a trusted CA. I am using signtool.exe from Windows SDK v6.0a. The certificate is located in the computer store and it is in the "Personal" folder. My command line is: sign / sm / n "My company" / d MyProductName / du http://my.url.com "C: \ Setup \ Setup.exe " When I run this command on the command line, it works fine. When I get this command a batch process (called by a webservice, when a command is executed, then no user is logged in) The following error occurs: Number of Errors: 1 SignTool Error: ISignedCode :: Returned Error: 0x80092006 No provider was specified for the store or the object. Anyone can help on this? The problem is that your service process can not use your private key, which is your account Gets accumulated in Log in to that account to run the web service and importing the private key into a main container, for example you can use it: sn -i MyCertificat

Is there an easy way to convert System.Data.DataTable to a linq entity? -

Is there an easy way to take a datatelle and put it in your unit type? I have a unit called a sampling, yet it is on a point returned through layering in the form of a datatellite- I woud, if possible, put it in its unit type Should be enabled? Thanks You probably can not be cast because your organization probably There is no legacy with Datarau (or datatelle, whatever). Assume class post {public entry ID (get; private set;} public string title {get; set;} public post (id) { Id = id;}} You want something foreach (var rows) {posts.Add (new post (convert toInt32 (line [ 0])} {title = line [1] .tostring ()};} No fun, I agree. That's NHibernate (and the younger brother unit framework and this cousin Linq2SQL).

PHP Maths Equation Function -

What I'm actually seeing is a math equation function that represents a string and takes the equation and returns For example, calculates the answer as For example ("(4 * 5) + 6) * 2) / 8" Output: 6.5 print calc ("((4 * 5) + 6) * 2) / 8"); Is there a class or a function that is creating some angels or doing what I do it myself thanks $ nums = "((4 * 5) + 6) * 2) / 8"; Eval ("\ $ nums = $ nums;"); $ X resonate;

c++ - Is there any reason to use the 'auto' keyword in C++03? -

note This question was originally posted in 2009, before C ++ 11 was confirmed and there was considerable change before the meaning of auto keywords. Auto means only related to C ++ 03 - it is specified as a storage category - and not C ++ 11 - This is an automatic type of deduction if you are looking for advice on using C ++ 11 Auto , this question is not relevant to that question. . For the longest time I thought there was no reason to use the static keyword because the declared variables outside the block area were completely global Then I came to know that declaring a variable in block-area as a "variable" would give it a permanent duration and declare it outside the block-zone (in the programming area), it will give the file-scope (Only used in that compilation unit Is done). So it leaves me with only one keyword that I (probably) still can not fully understand: auto keywords other than local variables Have other meanings? Whatever it does, is it

visual c++ - Designing an MFC App That Will Work on All Resolutions? -

I am currently designing my first GUI for Windows, I am using MFC and Visual Studio 2008. The monitor on which I am preparing my program has the original resolution 1680x1050. If I compile and send my program to one of my colleagues to run on my computer (usually a laptop running on 1024x768), my program will not fit on their screen. I want to read how to design an MFC application so that it will run on all the proposals, but I keep confusing information everywhere I think DLU resize your application for you. , And you should only run into problems at the same time, when you have a real bitmap that you need to worry about. But if this is the case, then why would my program no longer fit on my screen when setting my monitor to a lower resolution? Instead of "shrinking" my program, the screen used to carry real estate, which uses 1680x1050, becomes very large and grainy. The "clear" solution here is to set my resolution to 1024x768, to redesign my program to f

regex - Shell script to extract certain fields from XML files -

I'm new to Linux open and I'm not able to understand regex. Here's my question: I have a directory named / var / visitors and under this directory, I have a , b , c , d . In each of these directories, there is a file named list.xml and here, for example, list.xml to / var / visitors / a : & lt; Key & gt; Name & lt; / Key & gt; & Lt; String & gt; Mr. Jones & lt; / String & gt; & Lt; Key & gt; Id & lt; / Key & gt; & Lt; String & gt; 51 & lt; / String & gt; & Lt; Key & gt; Lane & lt; / Key & gt; & Lt; String & gt; 53151334 & lt; / String & gt; I have to merge the name field with its corresponding string and merge the id field with its associated string. I do not need any other fields. Name: Mr. Jones ID: 51 --- Name: MS Maggi Id: 502 Here's how far I got: < Find pre> cd / var / visitor-name "list.xml" | Xerose grapes Please h

html - What is this font? and CSS Help -

From the White House, this font looks very professional in this image What is the font? Is it just Times New Roman? Besides, does anyone know how to use CSS to create something like the image below? << You can use a font service to find the closest match. For your second question, you can create the size of your background image, and use CSS to set the background of that table. After that, simply input the text in the table cell and < / P> style = "text-align: center;" You might want to use Photoshop to wipe the original text in the background, as explained above.

php - Get results from my own and "friends" posts -

I have a problem that I can not understand myself I have tried to use LEFT JOIN, etc. but nothing works Database: I am using my MySQL so that you know. I am creating a small blogport for myself and my friends. User: ID, username, password, etc blog: ID, title, text, user_id, etc. < P> Relationships Followers_ID, the following_id I like to ask my own blog posts like this: Select from Microblog with WHERE User_id = {$ user_id} posted by the ORDER DESC and I list my friends like this: choose, user Relations, where relationship Faller_ID = {$ user_id} and relations.following_id = Users.id This was an easy part. but. I am not in any way in the tables because I want to list my friends' blogposts even within my loop. But I just do not want to show the post, I also want some information about the user who made a post, then I should also get some information from the user table. And that makes me bother! I can not understand it. In short: I want

c++ - How to find the global function? -

I have a function name called setValue, which is used in many classes. Also, I have a global function with the same name. When I press C-], this arbitrarily goes to the set value function. How can I go directly to the global set valley function? It is really pain that every time this function is global, it hurts to use it every time. when c -> returns several matches You can see the list with : ts Then enter the number to correct or dismiss the definition list. When ctags do not help ... you can search for events in setValue and then look like definitions. : vim / setValue / * & lt; - Grid for setValue in all files You can search only specific files, if you know that this subdirectory is in the header Src or Header: < Pre> : vim / setValue / src / *. H header / *. H is done once : to deal with to open a list For, you can navigate up / down to select the definition, so it is true that & lt; Enter & gt; You can close the list wi

c# - Linq: using StringComparer with GroupBy/Distinct in query syntax -

I have this (XLinq) query and wondered how it can be converted to the Conveyor syntax: < / P> var grouped = doc.Descendants () .GroupBy (t = & gt; t.Element (ns + "GroupingAttr"). Value, StringComparer.OrdinalIgnoreCase); This string syntax is without the compairer: var grouped = doc.Descendants in (t) group t. Element (group selection of NSS Group Group Group) My group is a bit more complex, so I prefer to use the group key instead of presenting a new property. This is what I have tried but does not work because the "key" is not available in the context of selection (I use my more complex key definition to clarify the fact that I do not want to choose To repeat it): var grouped = to doc.Descendants () Let's key = ((t.Name! = Ns + "SomeElementName")? T.Element (ns + ElementValueOrDefault ("Empty Group") Group by Key T. Choose ToUpper () in G new {Name = Key, Item = G}; Related Questions: I do not seem to S

iphone - Why might an array decoded from plist or JSON not respond to :class or :count while a programmatically created array does? -

I am facing a very troublesome problem. I have a UITableViewController that decodes a dictionary from a JSON or plist file (I have tried both) in its init method, then retrieves an array from that dictionary, later in the method table, see: numberOfRowsInSection: I, that array I am returning the count. However, due to the reasons behind me, calling the array at that point crashes the application, though the calling count is not directly followed by the assignment in the init. In addition, if I change the initial assignment with the programmatic array created (NSArray initWithObjects), then it works fine. JSON decoding init: NSString * jsonpath = [[NSBundle main bundle] Pathfoser resource: @ "Categories" type: @ "Jason"]; SBJSON * JasonPerser = [SBJSEN NEW]; NSDictionary * dict = [jsonParser ObjectWithString: [NSString stringWithContentsOfFile: jsonPath encoding: NSUTF8StringEncoding Error: Zero]]; Categories = [Dick ObjectForcae: @ "Content Content&q

Which XML parser for Haskell? -

I am trying to write some applications, which analyzes data, stores in very large XML files ( 10 to 800MB)) Each set of data is stored as a single tag, which contains the solid data specified as the entropy. I am currently a succession to Haxal, and while working with it I am not satisfied with the use of memory. When parsing the 15 MB XML file, it consumes more than 1 GB of memory, although I did not try to store the data in lists and it was processed immediately I used the following code: < Pre> importOneFile file proc ioproc = do xml & lt; - Enter the readFile file (sxs, res) = saxParse file $ stripUnicodeBOM xml Res Res string -> PutStrLn $ "Error:" ++ str; Nothing - & gt; ForM_sxs (ioproc proc. (ExtractAttrs "row")) Where 'proc' - process, which records the conversion of data into the data, and 'IOOPR' - process, something IO takes action - output on the screen, storage in database etc. How can I reduce memory consump

asp.net mvc - Would you recommend using the MVC Futures library? -

I have been disturbed using magic strings in C #, so I'm thinking of using the MVC futures library. Is there a reason why I would not like to do this, or should I know about any pass? First of all, just because it's a string, it does not make it "magic" string first, I recommend looking at T4 MVC templates that David Ebo writes: The advantage of this approach is using code generation, you get strong typing everywhere and it does not need to compile it which can damage the display.

Is basicHttpBinding really required when exposing a WCF service as a Web Service for .NET 2.0 Target Client? -

I have a WCF service and I am hosting it in Windows service. I reference the service from a Windows Forms client built on .NET 2.0. I can get web context by pointing to httpGetUrl = "http: // localhost: 8002 / HBAccess / help / mex", but when I check Reference.cs - there is only one namespace in which there is nothing . Now I add the original HTPP binding and repeat the same steps: And now I can see the classes for web service. My senior colleague says that httpGetEnabled will be sufficient enough to export the WCF service via http and create a proper web reference. Does anyone tell me what am I missing? & lt; System.serviceModel & gt; & Lt; Services & gt; & Lt; Service transaction support = "HBAcsNX.HBAccessBehavior" name = "HBAcsNX.HBAccess" & gt; & Lt ;! - & lt; Endpoint address = "" binding = "basic HttpBinding" contract = "HBAcsNX.HBAccess" /> - & gt; & Lt; Endpo

php - Online High Scores Solution -

Can anyone suggest a solution to implement an online high-score table for an iPhone game? I mean the simple engine publishes the results of the player from the HP query and sees the global high score table, I'm weak in PHP, so I'm trying to find an existing solution. Thank you. Here is a tutorial that has a downloadable "high score" PHP script You should know that there are many people who will try your high score table game, that means they will deceive this by monitoring how you post, and doing so with a new high score. Ensure that the higher digit has been posted with the hash key (it needs to be snack, and it needs to post the username and score). The hash key can be used to post a post posted to your keyboard. BTW - There are "high-score hosting" providers out there, this is crazy because it should be relatively simple for your own.

Most important feature in Visual Studio 2010 -

What is the most important or waiting feature in Visual Studio 2010 ?? This record, which happens during the run, and from time to time forward in the debugger Lets grow.

Flex / actionscript - Screen DPI -

क्या स्क्रीन डीपीआई प्राप्त करने का कोई तरीका है? मैंने कोशिश की है क्षमताओं .ScreenDPI लेकिन यह टूटा हुआ है, यह हमेशा 72 लौटाता है। कोई भी विचार? बहुत धन्यवाद। मैं यह क्यों पूरी तरह से मेरे सिर लपेट करने में सक्षम नहीं हूँ, लेकिन यह वास्तव में सही है। यदि आप ऊंचाई की जानकारी के द्वारा चौड़ाई प्राप्त करना चाहते हैं, तो आप क्षमताओं.screenX और capabilities.screenY का उपयोग कर सकते हैं। मेरा मानना ​​है कि आपको मैक का प्रयोग करना चाहिए । 72 अक्सर डीपीआई मैक पर होता है; एक विन मशीन पर, मूल्य आमतौर पर 96 होगा। निम्नलिखित बोली ने मुझे बहुत मदद की यह डीपीआई और स्क्रीन रिज़ॉल्यूशन के बारे में लंबे पोस्ट से है। यह पोस्ट आपके प्रश्न से केवल तंगता से संबंधित है, लेकिन स्क्रीन डीपीआई के काम की जानकारी कैसे उपयोगी है। आपका वेब ब्राउज़र रिपोर्ट करता है कि आपका स्क्रीन आकार वर्तमान में 1440x900 पिक्सेल (संपूर्ण भरा आपकी स्क्रीन के क्षेत्र, न सिर्फ ब्राउज़र विंडो)। इसलिए प्रत्येक 412x324 पिक्सेल छवि 412/1440 = 29% चौड़ाई और 324/900 = 36% आपकी पूर्ण स्क्रीन की ऊंचाई (आप

Flex/.NET: Simple chat application using FluorineFX -

I Flex /. Trying to create a very simple chat application using FluorineFX in the Net, but it can not be found to work. & lt; Mx: VBox width = "100%" height = "100%" xmlns: mx = "http://www.adobe.com/2006/mxml" & gt; & Lt; Mx: style source = "../../../ Monkeywrench.css" /> & Lt; Mx: script & gt; & Lt ;! [CDATA [import mx.controls.Alert; Import mx.rpc.events.FaultEvent; Import mx.rpc.events.ResultEvent; Import mx.messaging *; Import mx.messaging.messages. *; Import mx.messaging.events *; Import mx.core.Application; Private Function Message Handler (Event: Message Event): Zero {txtLog.text + = event.message.body.userId + ":" + event.message.body.text + "\ n"; } Private function messagefaultHandler (Event: MessageFlite Event): Zero {Alert.show (event.faultString, "Error"); } Public function sendMessage (): Zero {var message: AsyncMessage = new asyncMessage (); Message.body = {userId: Ap

.net - Equivalent to C#'s "using" keyword in powershell? -

When I use any other object in .NET-framework in C # I can save with Fu Companie.Br.QX.ASAP Assemblies. Redicquil clove. Namespace.i.Sachmuch Pisces. ... var blurb = new thingomobobe (); ... So what is a way to do something in a parsehale? I'm reaching a lot of pure things and I'm not happy to type. $ blurb = new-object FooCompany.Bar.Qux.Assembly.With.Ridiculous.Long.Namespace. I.Really.Mean.It.Thingamabob; all the time. View this blog post some years ago: here add -types.ps1 is quoted from that article: param ([string] $ assemblyName = $ ('assembly name is required'), [object] $ object) process {If ($ _) {$ object = $ _} if {throw 'object'} to load an object parameter or 'pipe' in a # $ dll = $ assembly = [System.Reflection.Assembly]: : LoadWithPartialName ($ assembly name) # Add property as member asset $ assembly. GetTypes () | Where {$ _. Ispublic- And! $ _.} IsSubclassOf ([exception]] and $ _ Name -Notmatch "Event&qu

javascript - How can an iframe change its parent's URL fragment (without causing a refresh)? -

I'm trying to get a child JavaScript application to update this original document. In short, this is a very simple problem: A javascript program opens an iframe in your document. Another JavaScript program loads in iframe. The second program needs to change the piece (anchor) in the original page. The first program, then "goes" for the new piece (the document status is updated, but the document is not refreshing) < / Li> "#" + string But when I do this in IE, parents start refreshing themselves, I think the page is reloading Just to make it a bit trickier: I want to get all the browsers (or very little IE and Firefox) Need Adhan. Both JavaScript programs are actually GWT web applications (hence I can tie specific code in different browser versions). If necessary, I can do strange things to get around security, parents and children will always go for each other. The child is always called by the parents. I have put a

sql - How do I see what character set a MySQL database / table / column is? -

इस के लिए (डिफ़ॉल्ट) वर्णसेट क्या है: MySQL डाटाबेस MySQL तालिका MySQL स्तंभ < Div class = "post-text" itemprop = "text"> यहाँ मैं कैसे करूँगा - स्कीमा के लिए: info_schema से डिफ़ॉल्ट का डिफ़ॉल्ट_चार्ट_सेट_नाम चुनें स्केमाटा WHERE स्कीमा_नाम = "स्कैनमेनम"; टेबल्स के लिए: info_schema.`TABLES`, सूचना_सैमी। 'COLLAATION_CHARACTER_SET_APPLICABILITY` CCSA से CCSA.character_set_name का चयन करें CCSA.collation_name = T.table_collation और T.table_schema = "schemaname" और T.table_name = "tablename"; कॉलम के लिए : info_schema.COLUMNS` से चुनें चरित्र_सेट_नाम जहां तालिका_एसकेमा = "स्कैनमेनैम" और तालिका_नाम = "टैब्लेनाम" और column_name = "columnname" ;

SQL server 2008 domain change -

In the near future, my organization must change both the machine name and the Windows domain for one of our SQL Server. Server is running SQL Server 2008 Enterprise Edition and OS is Windows Server 2008 Standard Edition. I have found good references to change the machine name, but anyone can help it that should be done to adjust I believe that only one when you change your domain, you need to change the thing that has user account access on the server when you install SQL Server, setup The process has given some rights to the account Are using the EVA to run. If it was a domain account (for example, OLDDOMAIN \ SQL_Proxy), you must give the same rights as the proxy account on your new domain (e.g., NEWDOMAIN \ SQL_Proxy). If, however, on the other hand you are using "local system" to run your SQL service, you do not have to make any changes at all, because this account needs to run SQL Service Enough powers will continue. Please post back after running this proc

drupal - How to perform Request destination in user page -

I / the user trying to redirect any user's efforts to log in. To redirect code to the next login in my module: function ccmm_user ($ op, and $ edit, & amp; $ account, & amp; ; $ Category = null) {switch ($ op) {case 'login': $ _REQUEST ['destination'] = 'admin /'; break; }} It is working then I try with the case 'scene': but it is useless. It seems as if you want the user never visit the user / user page, Be it or go there manually In that case, you should do a simple check in the hook_int function like this: function ccmm_init () {if ($ _REQUEST ['q'] == '/ User ') {drupal_goto (' / admin '); // where ever you want to send them}} Of course there are so many checks you should do, and you want to use the module, do not worry it's only in 8k size Therefore, worry about adding another module in this case is not such a problem.

c# - .NET Google Calendar API Sort Events by Date -

I am reading documents and now playing with different eventquap parameters for days. I am using C # .NET with Google's .net API, which I have established with a public calendar. I can properly capture the events of the API but I will not do it as per the upcoming upcoming events. Can give The events of recurrence have been merged with events of one shot in my calendar; I have read the stuff on the Internet to request direct query parameter strings in Yuri, but it does not look right when using it in the right API structure. Here's what I currently have: calendar service my service = new calendar service ("GoogleCalendar-test"); Eventquality myQuery = new event (); MyQuery URI = new Uri (calendar URI); MyQuery.NumberToRetrieve = NumberoffApents; Eventfilefid = myService.Query (myQuery); Forchcha (Callfeed entry in Almatrantry Entry) {Litteral Control® test = New Little Control ("and lieutenant; P & GT; ATPT; + ambient test +" I tried to play wit

object - Article/book: from source code to executable program? -

I'm looking for a "human-readable" article that says, for example, if possible, the source Code transition, C, ideally for an executable program, will include details about the object file format in the article, how different code of object code for eta.al. This fictional article also explains how the linker uses more than one object file, how it uses different ELF entities and thus produces a ready-execution file. Even more, what happens if the object file refers to external libraries, it will take an advanced / medium level C / C ++ knowledge. I would be interested in knowing whether such articles / books / blogs are known to mankind. Google for more ""

Do any visual studio plugins currenlty support auto refactoring from a variable to a property -

I'm looking for a refactoring plugin that has the ability to specifically announce such an announcement: MyType as MyType or MyType as Private MyVar And change it to: Private personal property as mymymymytv MyType Go back as MyVar MyType Set _myVar End (ByVal value as myType) _myVar = value End Set End Property < / Code> My example is in VB but C # is very supportive Neither will I know the VSS template for the privilege, but use it only slower than typing. Thank you in advance Free version of CodeRush to do this You can use the "Encrypt field" refactor. The full version of Kolder will have to be cold, harsh, cash or more and more (I imagine there are other tools, but I have two of them)

settings - VIM Disable Automatic Newline At End Of File -

So I work in a PHP shop, and we use all different editors, and we all Have to work on windows. I use Vim, and everybody in the shop keeps complaining that whenever I edit a file, then there is a new line below I searched around and found that it is a documented behavior of the WE & amp; Vim ... but I was wondering if there was any way to disable this feature. (This would be best if I disable it for specific file extensions). If someone knows about it, then it will be good! Even if the file has already been saved with new lines at the end: < P> vim -b file and vim: : set noeol: wq at a time. Alternatively you can also type in the : e ++ bin file yet another option: : set binary : Set Nullol: wq

vb.net - Reading vCalendar and vCard using .NET? -

I want to be able to read vCard and vCalendar data using .NET, I have something that it Does, and it has seen the specification For those formats, in which there is no format here, my current application has some test data: BEGIN: VCALENDAR version: 2.0 PRODID: - // Microsoft Corporation // Windows Calendar 1.0 // eN CALSCALE: Gregorian method published bEGIN: VTIMEZONE TZID: Greenwich Mean Time: Dublin \ Edinburgh \ Lisbon \ begin in London: standard DTSTART: 20001029T020000 RRULE: freq = yearly; BYDAY = -1SU; BYMONTH = 10 TZNAME: GMT Standard Time TZOFFSETFROM: +0100 TZOFFSETTO: +0000 END: Standard Start: DAYLIGHT DTSTART: 20000326T010000 RRULE: FREQ = YEARLY; BYDAY = -1SU; BYMONTH = 3 TZNAME: GMT Daylight Time TZOFFSETFROM: +0000 TZOFFSETTO: +0100 END: end of daylight: VTIMEZONE start: VEVENT description: upload ZuneCardr new ZuneCardr.com DTSTAMP of InTouch Brand: 20080l20Tl35839Z DTSTART; TZID = "Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London": 20 08 0318

How do I convert RGB into HSV in Cocoa Touch? -

I want to set the background color for the label using HSVV instead of RGB. How can I apply it to the code? Code: //. File #import "IBAppDelegate.h" @ implementation IBAppDelegate @ synthesize label; {Self.label.backgroundColor = [UIColor colorWithRed: 1.0f green: 0.8f blue: 0.0f alpha: 1.0f]; } You can use the following feature maker of UIColor

.net - Multiple WebBrower sessions / processes in one window -

I'm one. I would like to create a .NET application that uses many examples of WebBrowser control. The catch is that I want every web browser control to run its own session. IOW, I have a requirement that the collection of session cookies, javascript global namespaces, etc. is different for each example and all examples are shown in the same window. AFAIK, this is what I need to do to run every web browser control in a different process. Some questions: Is my belief about many processes right? Is it possible that every web browser instance is created in a single Windows Form application to run in a different form? Thank you in advance ... Currently, no , You can not apply such an isolation without using the web browser controls to put each instance in a separate process.

.net - Append html space algorithm -

This question is on the line We have an old code base and CSS Can not be used. When a whole column is empty in the table, the resulting table is very ugly. We have a text email solution that adds empty space to end a word at the end, in which the remaining letters are set, which you can use for the new string Specify using. Since the new string only takes one character, it was seeing that 1 liner, people with small types of examples can come up with it. We use .NET 3.5sp1 public function stringings (string data as volt data, size by size is small, use well valued full boolean ) If the data in the form of a string. Langs & gt; Return shape then (data, size - 4) & amp; "..." Otherwise if usehtml then 'small algorithms here (& amp; nbsp;) or return data; If you actually If you want to & amp; Nbsp; If you want a pad with - OK, clear - I'm not sure that this is a great idea, but something like this (C # Sorry): int count = Size -

c++ - Is there a "function size profiler" out there? -

Three years after working on a C ++ project, it has become executable 4 MB. I have to see where all this is going on. Is there any device that can report what is the biggest place? By template (all the elements), and the library will be good to see the size of the class (all the functions of all sections) (how much is C related to the standard library and STL? How much is the XI for each library?) EDIT: Note, I am using Visual C ++ on Windows. in Linux , you can show all the symbols in the executable and You can use reverse order to sort by size: $ nm -CSr - size-sort & lt; Exe & gt; Options: -C moves the C + + names. -S Shows the size of the symbol. Strong> Sortes. If you want to get the result per name space or per class, you can enter ' namespace :: ', ' namespaces :: class_name :: < / Code> ', etc can only output grep . . If you want to see only those symbols that are these executable (not defi

c# - How to evolve a .NET codebase over versions of .NET -

I have net components that were developed very long (1.1). I will continue to provide them 1.1 for those versions, which require that version, but in some versions - in some cases the same code, in some cases enhancements - for NAT 2 and .NET 3 (.5) In each subsequent case, I would like to take advantage of the new features of the platform for certain components. I am looking for guidance about what is the best practice in this situation. In a case where I do not want to any change any component, I think I can still provide it as 1.1 and later Can use 1.1 assemblies just like libraries / applications. I suspect that there may still be good reasons to provide assemblies made with later versions of NET - e.g. Demonstrate - but my understanding is that I can supply just 1.1. Is it true? In this case, where I am working with 1.1, but want to keep the bulk of component code, but what is the best way to add features for later versions of NAT? Different versions of code Supply

sql - Dropping an entire table -

I am planning to delete an entire table with rows of more than 930,000 data. This is the best way without increasing the log size or increasing the DB size. I am on a live site and my hosting has given me 150 MB instead .. I already have 125 MB and therefore need to be careful about DB size because increase in log size of my DB If you do not need to log in to the will or delete activity altogether (i.e. you will not need to dump your database to a specific point of view There is no need to recover at ) So you can flush the contents of the table using the command / deleted. / P> On the other hand, if you want to fully log this event, then you should delete the data in batches to maximize performance, see the following article for details of how to do this: >

about SUBDOMAIN vs SUBFOLDER question again? -

I am planning to create a site, where my original domain is www.example.com There is a index page where it will allow users to choose 3 websites i.e. politics.name Com, games.example.com, news.com or example.com/politics, example. Com / games, example.com/news? Now, I do not know what to choose? Linking a SUBFOLDER or SUBDOMAIN? What I would like to do is that the rate of any click rate in my link will be passed to my root domain which is example.com. Is this possible? If you are using subdomains, for example: subdomain.example Com < / Code>, the request will be sent to subdomain.example.com and will not be sent to example.com , unless you explicitly do so Do not Clicking on example.com/subdomain allows example.com .

php - building portal / blog like in iwannabemom.com using joomla -

I need some suggestions ... I created a web portal / blog that looks like this ) The reason I am using Joomla because I have some components that I need to apply to Joomla instead of using WordPress. What are the components for (Joomla 1.5): 1. Top News (can be scrolled). I know that it's organic, it's good ... but I want another option for that. Thumbnail image for each article. There is no thumbnail for Joomla article module .. Blues: (3.) Comment system. Should I use Disqus (disqus.com) or use jomcomment. About Disqus, is it good and reliable services? 4. Tag hierarchy ... any good recommendations 5. I hate Joomla Media Manager and Joomla Text Editor (TinyEEE) because I can not directly select from Media Manager (I can type full url for images Any good recommendations? Please separate your question separately so that someone can answer To answer a common question for people, it is easy for you to ask. For point 4: Jacek Zielinski's Geetag is good for a tag