Posts

Showing posts from September, 2015

Howto Select rows that match the intersection of multiple rows in other tables in MYSQL? -

It looks complicated (and perhaps it is). But I can not imagine how to solve it. Tables are: Company ID | Name 1 | Google 2 | Samsung 3 | Microsoft Parades S ID | Name 1 | Header 2 | Body || 3 Footer Tags id | Tags 1 | Internet | 2 | Softwetts COMPANIES_VS_TAGS ID | Company_id | Tag_ id 1 | 1 | 1 2 | 2 | 2 3 3 | 1 4 4 3 | 2 PARAGRAPHS_VS_TAGS ID | Paragraph_id | Tag_ id 1 | 2 | 1 1 | 2 | 2 I must select all the companies, which belongs to the [any_number] tag of the paragraph by logical and Therefore, the above examples In, the physical paragraph should only produce the "Microsoft" company. Add: I can use only WHERE and sub queries : this is the limit of CMS that I have to use. Learn how INNER JOIN works.

apache - Giving public access to root directory of svn -

I was wondering if people are possible to use subdivision root directory trough Apache and 'dav_svn' modules. Now I can only access those repositories which are 1 level lover compared to the root directory ( "svn / game" "svn / anything" on "svn /" not). My httpd Conf : & lt; Location / svn & gt; DAV SVN SVN ParentPath C: / SVN AuthzSVNAccessFile C: / SVN / User Requires Any Certificates Legitimate User Authip Basic Ethanem "Subvision repository" AuthUserFile C: / SVN / svn-auth-file & lt; / Location & gt; Now, when I try to access the root directory, it asks me for a username and password. Support will be appreciated. Thanks. I think what you are asking is access to the Subrogation repository list, which is disabled by default ... DAV SVN SVNLISPNRPR C / SVN on Pathpath C: > AuthzSVNAccessFile C: / SVN / users ... It is also important to keep in mind that Subversion clients can not talk ...

Retrieve username/password from browser using javascript -

My web server has enabled authentication. When I use my web server I get a pop-up from the browser for the username and password After logging in, I want to retrieve the username from the browser using Javascript. I'm not using any type of form to get a username / password, so, I'm not even setting any cookies. Can we use the DOM method to use the username? Or any other way? Regards, Joy As far as I know, Can not do this together View this link from php.net: HTTP Authentication with PHP:

Storing a file in the blobstore from a URL in app engine? -

I want to retrieve a file from a URL such as in the blockostore ... How do I do this? and then post it yourself It is likely that Google will notify you at any time Shortly, it will not allow the URL to pass any time to avoid using it as a DDOS.

javascript - How do I wait for first canvas-repaint until @font-face-font is loaded? -

I have an HTML5-canvas and context.fillText (...); Using the @ font-face-font. I have a problem displaying the page with Firefox (3.6), the font on the front of the canvas has not been downloaded yet, so the text will be displayed with a standard-font. I got a 'solution' but it does not work, because the font is used only in the canvas and the canvas loads and jQuery is used with AJAX. Is there a better solution than trying to use it? Timeout setTimeout (repaintCanvas, 500); ? Well, you can try it, $ Get ('font / url.ttf', function () {// do canvas code .... due to the font loading ...});

c++ - Help with Unit Testing -

I'm new to unit testing, can someone tell me where the test class is defined in the following code and I How can I find it? #ifndef UT_USERSESSIONMANAGER_ #def UT_USERSESSIONMANAGER_ # contains & lt; Gmock / gmock-genral.h & gt; // If this is defined in, how can I get it # include & lt; "Pre_include.hpp" & gt; // I'm sure it is not included in # include & lt; "Pre_usersession.hpp" & gt; // I'm sure that this name is not previously defined; Class Ut_UserSessionManager: public :: testing :: test {public: Pre_UserSessionManager * UserSessionFailure; Pre_UserSessionManager * UserSessionSuccess; Public: Virtual Zero Setup (); Virtual Zero TierDown (); } If this code is already compiled and links and you use Visual Studio Then you may want to switch to the creation of the browse information when the build has placed its cursor over the symbol in the symbol and pressed the F12 key. But maybe this is not easy ... Usually y...

python - How can I combine the awesomness of SQLAlchemy and EAV DB schemas? -

I have recently been doing something with Pylons and there is enough for SQLAlchemy models for database interaction. My website is a part, although I think it can benefit from the EAV Schema. Use this as my table example: id | User ID Type | Value --- + -------- + -------- | ------------ 1 | 1 | Phone | 111 111 111 --- + -------- + -------- | ------------ 2 | 1 | Age 40 To remove and update data, I can run the same questions as the following: Selection selection of table where userid = 1 more Type = 'phone' update table SET value = 41 where user id = 1 and type = 'age' It is easy and works ... but manually preparing queries I do not have a favorite attitude to use SQLAlchemy to make my table model and make it all leg Should the. If I was using a standard schema, where each type had its own column, I could do the following people: Class people (base): __tablename__ = 'people' id = column (integer, primary_key = true) userid = column (inte...

linux - Perl script usable as a program and as a module -

I have a Perl script (standalone program) that contains some subs and want to reuse it in other scripts. Due to the limitations of the performance environment, I can not move the function to a typical .pm file. Is it possible to distinguish whether the script requires a standalone program or is it ed / do written by another script? The only thing I could get was that the caller at the top level: there is no collar in the standalone program, while when is required ed Caller shows which module was loaded. Is there a better solution? Yes, your caller approach was correct - it's called "modulin" Technique I'm guessing that Brian invented it until someone exposed me to the contrary. The main working part of the modulin looks like this (from the answer given below from below): __ PACKAGE__ - & gt; Run (@rrgv) until collar no; Sub run {my ($ square, @args) = @_; } 1;

iphone - Possible to make a transparent gradient mask? -

I have different images in a uiscrollview and I want to know whether it is possible to create a mask overlay of 100% - 50% - 0% transparency, so when images keep coming out, I have a smooth fade. Depending on what you're trying to do, you can simply create an overlay view Which is black and can change it in alpha 0 and animate the change. This should do something like this: [UIView startup permissions: @ "feedview" reference: zero]; [UIView Set Animation Duration: 0.65]; OverlayView.alpha = 0.0; [UIView commitAnimations]; Or you can use a serration, where something like this should be done: // Create a catastrophic object for the first transition description CATransition * Transition = [catrash animation]; Transition.duration = 0.5; // In short time using the function transition. Transition.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; Transition.type = kCatransitionFade; [[Self.view layer] addAnimation: ...

networking - Network connection reset after intensive operation -

I'm doing a measurement project where I send and receive data from multiple devices on my network. To send / receive, it can be considered intense and intense, because there is almost no break and constant flow of data. However, the data from / to each device is very small, on the sequence of some bytes of each. For some reason, I am experiencing a reset of my entire ethernet connection, where my internet connection also goes down, and I lose all my devices as well as the connection. I have never faced such a situation and I am surprised that in some normal circumstances can this be reset? Actually, it has come to know that the way I made my thread, do it with Was it, in which I prepare a new socket continuously without leaving the last one is stupid right? Well I've crashed code and Ethernet now.

rails many to many self join -

Some can tell me in the right direction: I try to make a model for rail Construction of the following: Class AID There are many "Class A" relations (hence it is a reference of itself) I was looking for For the migration and model. I'm not sure what the correct joining table is (I think this is a simple 2 column table class_id, classarial_id-> both point to the class) and how to construct a model I like something class person & lt; ActiveRecord :: Base is has_many: friendship ,: foreign_key => "Person_id" ,: class_name = & gt; "Friendship" has moments: Friends ,: By & gt; : End Friendship of Friendship & lt; ActiveRecord :: Base is_to: person,: foreign_key = & gt; "Person_id" ,: class_name = & gt; "Person" belongs_to: friend,: foreign_key = & gt; "Friend_id" ,: class_name = & gt; "Person" will expire and will be similar to tables People: ID; Name;...

jquery - keep accordion collapsed after dropping its header -

I am using the jquery accordion UI with the sortable feature, now I am facing that problem When I drag the header of the header and place it at the specified place, if the header collapses, then it spreads and it collapses if it has already expanded. So I want to keep the headers off whenever the user drags it away and leave it. My configuration is a compliance to the property parity I have set a transcepicious truth because I want a feature that if a user clicks, the header header spreads and click again. Becomes short. I resolved myself by adding the following part of the code Var stop = false; $ ("# accordion h3"). Click (function (event) {if (stop) {event.stopImmediatePropagation (); event.preventDefault (); stop = false;}});

Dynamic linking and Python SWIG (C++) works in C++ fails in python -

I have a library for which I have created Python Cover using SWIG. The library accepts tasks provided by the user, which is in a dynamically linked .so file. At the moment I am working with one that I have created myself and has been working on dynamic linking in C ++ . When I try to run it in Python, I get undefined symbol errors. These are the symbols that are not present in the provided file. But the files are present in the main program (essentially these are the tasks that allow the provided module access to the main program data). I do not get any error in running a short test program in C ++, but with this cover a small test program (which used to work before) fails in Python. I can not think of an explanation because it may fail in C ++ and not in the Python. I'm a little worried that C ++ is not working properly, but I'm not telling, and Python C ++ is not raising errors. Still the results obtained by C ++ are accurate, so it seems impossible. Any idea how this...

php - Editing multiple array values (if they exist) -

Well I'm struggling about this for about 5 hours and I know that my brain is fried I thought I had some better people who know what they are doing: p Now I have explained the problem properly. I want to display all goal scorers with their name and target time for each different goal such as: Carlton Dixon (23, 53) Denniel Taskar (1). The only way I can think of doing this is to replace the array with a new one in which the element has all the goals, then with all those targets, make a line for the name and one line, maybe I Do not see me right? Cheers dood array (8) {[0] = & gt; Array (3) {["fname"] = & gt; String (7) "Carlton" ["snom"] = & gt; String (7) "Dickson" ["Time"] = & gt; String (2) "23"} [1] = & gt; Array (3) {["fname"] = & gt; String (7) "Carlton" ["snom"] = & gt; String (7) "Dickson" ["Time"] = & gt; String (2) ...

php - How to display a custom profile based on a specific role? -

For example, I have a role called "teacher" for any user related to that role, I display a custom profile I want to be able to do that is different from the main. I read some space that a topic can create a tpl file in the pages folder and how to show some specific roles or URL paths. Will anyone help me to take care of me and help me? I would like to take a look at the content profile module: With this module you can specify the type of content used for the user profile. By doing this, you can take advantage of CCK and do anything with this profile node that you can do with other types of nodes (view, list with panels, style with node.tpl.php etc.) . In addition, you can assign different roles differently to different profile profiles by setting the node permissions properly. For example, you want to check "Create teacher-profile content" and "Edit your own teacher-profile content", where "teacher_profile" is the name of the type of ...

c# - Extender Provider failed to return an Extender -

We have upgraded from .NET 2.0 to .NET 3.5. One of my co-workers receiving the following dialog when playing ASP.NET Web project under Debugger in Visual Studio 2008. He can fine, but he can not debug (hence, it is a run-time issue): Microsoft Visual Studio "Extender Provider An Extender for This Object Please try again before proceeding. (You can change the name of the current web configuration and add a new one.) " OK This error has been discovered that there is a hit in French, but Google has translated , And the friend has his own web The config has been deleted, my colleague has the web. Is configured. Thank you! I have encountered , extender provider this object Failed to return an extender for. Message in a winforms designer window I know that your question is about ASP.NET 3.5, but in my case I resolved it: Completion of solution in Visual Studio Delete obj and bin directory from the problematic project. When I reopened the solution, ...

reflection - How to determine lazy-loaded properties at runtime on a linq table? -

I am running on the properties of various mapped tables in my code and it is necessary to know that every asset is lazy. Whether it's loaded or not? I've found that the frequency variable used for storage, which is the property on the storage attribute, will be System.Data.Linq.Link . Is this a way that I can take advantage of these two facts at the runtime to solve this problem? Code: Public Zero LazyLoad (Type Table Type) {foreach (Tablet on TableType.GetGenericArguments () [0] .GetProperties ()) {If (/ Bad shipment has been done / /) {// The real work is here ... console WriteLine (prop.Name); }}} Mapping looks like this: public partial class address {private system.data.ink.ink.link / Ex> You are almost there, just a teaspoon of medication filled with reflection helps; -) Private Stable Bull ISLAG Loaded Property (PropertyInfo Properties) {var column = property.GetCustomAttributes (true, ColumnAttribute) [0] [0] As a column attribute; Var fiel...

iphone - AVCaptureVideoPreviewLayer: taking a snapshot -

I'm trying to emulate the animation seen in the default camera app, where the snapshot of the camera viewfinder is animated. The corner of The AVCaptureVideoPreviewLayer object that holds the key to solving this problem is not very open for these requirements: Trying to make a copy with a new copy of it. - (id) initWithLayer: (id) layer .. without an image snapshot, gives an empty layer, so clearly there is some dark magic here . Your clue / bouquet is most welcome. M Here are the possible solutions, no great IMO is not: You can add an AVCaptureSession for both an AVCaptureStillImageOutput and AVCaptureVideoDataOutput When you set sessionPreset to AVCaptureSessionPresetHigh , you will start receiving the frame by the API, and when you switch to AVCaptureSessionPresetPhoto So you can take the actual picture, before taking the picture, you can auto on the video Can catch a frame, get a frame, and then return to the camera. The main warning is that...

In a shell (bash) How can I execute more than one command in a pipeline? -

I am trying to output a pipe through more than one command at a time in a box shell, After my knowledge, I am coming with it: awk '$ 13 ~ / type / {print $ 15}' filename.txt | (Wc -l || sort -u) I have to do the sequence of awk command to count and sort, how can I complete this? Even & amp; Amp; The command does not work, it executes the first command and then exits. I think this is my knowledge which is failing. Thank you in advance. If you want to send output to two different commands in a row, you have to do process subcategories Will happen. Try this: awk $ 13 ~ / type / {print $ 15} 'filename.txt | T & gt; (Wc-l & gt; & amp; 2). Sort -u It outputs the sorted calculations on stderr and sorted on stdout. If you need line count on standout, you can do that by & gt; 2 & amp; Nbsp; , but then it will be passed on the sorted call and (most likely) it will be sorted upwards. Edit: The correct explanation of what happens bas...

java - Roles in JSP and Servlet -

I want to create an application with three types of user: admin, professional and ordinary users will see all the special pages, so Should I use roles for a good example or tutorial of a person how to do it? Create a DataStore firstly the users and the roles and relationships between them. The simplest option would be a SQL database with a user , role and user_roles tables. Then there are basically two ways to achieve this in the JSP / servlet side. The easiest to get started, but it will end up for long lasting maintenance. You must use the login subletter to create an HTML / JSP login form, a login sublett, login the user and login so that it can check if the user is logged in or / or access to requested resources. . Use You just have to create an HTML / JSP login form and for the rest it goes to all the web.xml and server scope seminars is. Specific page content / components based on the user's role to display, you can use JSTL's flow control tag: ...

objective c - @class vs. import -

संभावित डुप्लिकेट: नमस्ते क्या कोई उद्देश्य वर्ग में @ वर्ग और आयात के बीच का अंतर समझा सकता है? मैं कब का उपयोग करेगा? क्या यह बेहतर है / अधिक कुशल? बहुत धन्यवाद

android - Contacts favorites search bar -

I want to repeat the search bar in the Contacts app> Favorites> Search (without the mark). Can anyone give me some tips? With a few top, left and bottom padding in a linear layout, the weight is free_perant and the weight of 1? With a button with some right padding? How do I see that button? Is there a parameter that I can get the background of the back slope? Or do I need to provide an image? Check it and see that the app's code has been applied to it. .

Rails Routing Conditional with multiple value options -

I have a railway route that is based on two conditions, that domain and subdomain are a specific value The problem is that the subdomain There are several possible values ​​for working, but I can not give them as an array or a hash. ; {: Domain = & gt; Ap conifig ['base_domain'] ,: subdomain => 'Www' .. 'www3'}) Sign up | Sign up | Signup.plans '/ signup' ,: Controller = & gt; 'Account',: Action = & gt; 'Plan' ... [Small] ... end The above examples are www, www1, www2 and amp; Although W33 is a value for subdomains, it does not really solve my needs, I need to be able to accept the value of '' (nothing), 'www' and 'www2', so I Try some of the extension: map.with_options (: conditions => {: domain => ap conifig ['base_domain'],: subdomain => ['' , 'Www', 'www2']}). How will you install it in ActiveRecord, but it does not appear to be the same for r...

Perl Net::SNMP returns noSuchName when snmpwalk works -

I'm new to perl, but I'm trying to write plug-ins for nagios. I have a simple request that is unsuccessful, but if I try the same request with snmpwalk it works. My code is: #! Use / usr / bin / perl -w hard; Net :: SNMP; My $ host = '10.10.10.203 '; My $ community = 'myComm'; My $ session; My $ error; My $ reaction = bottom; ($ Session, $ error) = Net :: SNMP-> Sessions (-hostname => host $ -Vijon = 2; -community = & gt; $ community, -port => 161, -timeout = & gt; 20); My $ uptimeOID = '1.3.6.1.2.1.1.3.0'; My $ myOID = '1.3.6.1.4.1.7 933'; If (define ($ response = $ session-> get_request ($ myOID))) {if ($ session-> error_stats == 2} {my $ sessionError = $ session- & gt; Error; Print ("($ session error) OID is not supported ($ myOID). \ N"); }} And {print ("$ response"); } If I run this script then it will fail to say no name, but if there are any runs: snmpwalk -v 2c -c myComm 10.10....

symbian - Record voice call -

Is there a program or library that will allow me to record phone calls on Symbian OS? Especially using Java / C ++ / Python? You can write your own See the latest sample in CCMR

winforms - What good resources are available for an experienced ASP.NET developer to learn Windows Forms/WPF programming? -

I am a ten-year veteran of ASP.Net and C # development and I am going to a situation where I will be Developing more Windows Forms and WPFs I have minimal experience with these techniques. Can you recommend any good books or resources that will help me ramp up these techniques quickly? I want to find resources that release basic .NET programming topics and achieve the good application architecture, design and implementation heart. There are several resources in it, it's official, Microsoft Windows startup and WPF site. It's being said, I'm just trying to get a very basic idea of ​​Windows Forms, and instead, focus on learning WPF. This will help Silverlight for development, as well as simultaneously. WPF is new technology, and actually going forward for proofing itself for a good way ahead of the future. By learning it first, you will not have to expose many bad habits that you will take with Windows Forms Development.

iphone - Delete particular row from table view -

In my app, I'm coming to delete particular row from the list view my table view content database and data from database After receiving, I pushed the array. Then I changed an array, here on after I showed the content in the table view. My problem is that when I try to delete the second row of the table view on the second row, the first row of the table view is removed, here I have put in the command editing style method code, if (editSecurity == UITT ViewingTableDialate) {[savedArray removeObjectAtIndex: indexPath.row]; [SaveTable deleteRowsAtIndexPaths: [NSArray arrayWithObject: [savedArray objectAtIndex: val]] of Sathroanimeshn: UITableViewRowAnimationFade]; NewsObj * [[(UIApplication shared application]]] nsManagedObjectContext]; NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription * entity = [NSEntityDescription EntityForName: @ Managed object contexts in "ArticalDetails": [ SelfknewsObj] [FetchRequest set Antiti: entity]; NSError ...

mysql - PHP, text echos out of database without new line, all in one piece -

I have a long text in the database. This php_mayadmin looks fine, but when I resonate it on a page, So it loses all formatting, that is, no new lines, all in one volume any idea? :) Thank you! Perhaps because the line breaks \ n want html and & lt; Br / & gt; therefore use

objective c - NSFetchedResultsController crashes on every save operation -

Even when I comment on every activity within representative methods, every time I "save managedobjectcontext" : Noil "app crashes with different Eros namely the following: (looks like a release issue, but I'm not sure where. # 2 0x0236c1b2 - [NSFetchedResultsController (PrivateMethods) _postprocessInsertedObjects:] in # 3 0x023721bc - [NSFetchedResultsController (PrivateMethods) _managedObjectContextDidChange:] __CFXNotification in # 4 0x00024c1d _nsnote_callback # 5 0x02690cf9 _CFXNotificationPostNotification # Post_old # 6 of 7 0x0001a7c2 in 0x0261011a - [NSNotificationCenter postNotificationName: Object: userInfo:] # 8 in 0x022ae519 - [NSManagedObjectContext (_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:] # 9 in 0x0231db33 - [NSManagedObjectContext (_NSInternalChangeProcessing) _createAndPostChangeNotification: withDeletions: withUpdates: withRefreshes:] # 10 0x02290f78 - [NSManagedObjectContext (_NSInternalChangeProcessing) _...

xslt - for-each: get every 3rd item (split into 3 columns) -

मेरे पास एक्सएसएल में निम्न नोड हैं: & lt; foo & gt; & LT; बार & gt; 1 & lt; / बार & gt; & LT; बार & gt; 2 & lt; / बार & gt; & LT; बार & gt; 3 & lt; / बार & gt; & LT; बार & gt; 4 & lt; / बार & gt; & LT; बार & gt; 5 & lt; / बार & gt; & LT; बार & gt; 6 & lt; / बार & gt; & LT; बार & gt; 7 & lt; / बार & gt; & LT; बार & gt; 8 & lt; / बार & gt; & LT; बार & gt; 9 & lt; / बार & gt; & Lt; / foo & gt; और इसे निम्नलिखित HTML में बदलना चाहते हैं: & lt; ul class = "one" & gt; & Lt; li & gt; 1 & lt; / li & gt; & Lt; li & gt; 4 & lt; / li & gt; & Lt; li & gt; 7 & lt; / li & gt; & Lt; / ul & gt; & Lt; ul class = "two" & gt; & Lt; li & gt; 2 & lt; / li & gt; & Lt; li & gt; 5 & lt; / li & gt; & Lt; li & ...

ruby on rails - Managing user session with devise on iPhone APP -

I have a rail application for which I am planning to prove my users and it works very well is. Now I want to write an iPhone application (not just a webUI but the appropriate APP) that reaches the same data and therefore requires the same authentication how should I go about doing this? I want to log in by planning and keeping the session open so that the questions can be worked back and forth as they do on my website. I am both new to rail and planning. I'm actually trying to do the same, I also have a rail application, which is used I want to make an iPhone app. I do not know that I have a good answer for you so far, but here are some things I have learned ... According to the README on the Devwah GitHeb page, it seems that devotion is 2 Executing Mourning Authentication with Modules: Database Authentication: While validating a user's authentication, the password is encrypted and stored in the database The literacy. Authentication can be done through POST re...

Multi-node concurrency in Java -

I wrote a multi-threaded Java program to solve an embarrassing parallel problem, such as all these free CPU cycles I want to reuse my solution on multi-core CPU so that it can run on multiple nodes, while still I have left the code already written. I have used the MPI with C in the past days and it has been said that this is the "correct" way of addressing the issue of maximizing the CPU cycles, but I would like to know about other concurrent frameworks in Java I know as RMI and wonder if they are good. Is there any good way to handle multi-node and multi-core concurrency in Java, where the main goal is to take advantage of the maximum CPU cycle from the cluster? Edit : I have no easy way of handling this thing. I'm not surprised, but I was hoping. :) JMS is a good place to start.

ruby - Facebook FQL returns <fql_query_response list="true"/> -

I'm trying to get a Facebook panel query to work using the browser, I have a valid Oeth The token is (I can make the graph with the API call). Here's the url I've tried: https://api.facebook.com/method/fql.query?query=SELECT Metric, Object from Insights WHERE object_ID = 89192912655 and end_time = 1280430050 and duration = 86400 and metric = 'Page_fans' & amp; Access_token =? I tried to run the fql query via a SQL Encoder first: https://api.facebook.com/method/fql .query? Query = Select% 20metric% 2C% 20value% 20FROM% 20insights% 20WHERE% 20object_id% 3D89192912655% 20and% 20end_time% 3D1280430050% 20AND% 20period% 3D86400% 20AND% 20metric% 3D'page_fans' & amp; ACCESS_TOKEN =? I tried some other metrics, I can also get the metric through the graph API, so I know that they are there. I am sure that something is silly, but I have been stumped for a while! Every call just gives it: & lt ;? XML version = "1.0" encodin...

asp.net - set value of radio button back to false -

Okay, I'm trying to do this work for something now and think that enough is enough and you Help to leave Based on what I click, right or wrong, this will give reasons to show or hide my table accordingly. My point is, if I cancel (outside) this outside, when the selected "true" is, and it comes back to it, the "true" will still be chosen and vice versa. What I want to achieve, regardless of the selected value, when I turn it off and come back, the selected value should be set to "false". Any ideas? & lt;% var rblRecurrence = New SelectList (new list & lt; ListItem & gt; {New ListItem {Text = "Yes", Value = "true"}, New ListItem {Text = "No", value = "wrong"}}, "value", "text", "wrong"); Var htmlAttributes = new dictionary & lt; String, Object & gt; {{"Onclick", "if (eval (this.value)) {$ ('# tblrecurrence'). Show ('slow');} an...

Wordpress view index.php -

I have the client site at domain / index.html and have installed WordPress on the same server. Html pages to the WP site Is complete. How can I view the Wordpress site on front page via domain / index.fpp? Do I Need to Change the .htaccess File? Thanks .. Install WP in another directory, as explained, and then a plugin Use to log in as restricted and use to close RSS feeds. Also set your WP Privacy option, to block search bots, when the site is subject to Dev.

How do I inline edit a django user profile in the admin interface? -

यदि आप किसी उपयोगकर्ता (django.contrib.auth.models.User) के बारे में Django में अतिरिक्त जानकारी संग्रहीत करना चाहते हैं तो आप उपयोग कर सकते हैं एक "प्रोफ़ाइल" मॉडल को प्लग करने के लिए निफ्टी AUTH_PROFILE_MODULE। प्रत्येक उपयोगकर्ता को एक प्रोफ़ाइल मिलती है यह सब यहाँ वर्णित है: अब, मान लीजिए कि मैंने एक यूजरप्रोफाइल नामक एक मॉडल के साथ खातों को बुलाया है और अपने उपयोगकर्ताओं के लिए प्रोफ़ाइल मॉडल के रूप में पंजीकृत मैं उपयोगकर्ता (या इसके विपरीत) को संपादित करने के लिए व्यवस्थापक इंटरफ़ेस में प्रोफ़ाइल के संपादन को कैसे इनलाइन कर सकता हूं? मैं आंद्रे के समाधान के थोड़ा बेहतर संस्करण का प्रचार करता हूं क्योंकि यह सदस्य से व्यवस्थापक django.contrib आयात व्यवस्थापक से / admin / auth / user /: में सूची दृश्य को तोड़ता है .Models django.contrib.auth.models से यूज़रप्रोफ़ाइल आयात करते हैं उपयोगकर्ता से आयात करें django.contrib.auth.admin आयात करें userAdminAuthUserAdmin वर्ग के रूप में UserProfileInline (admin.StackedInline): model = UserProfile max_num = 1 can_...

What command will erase all but the first three columns of a matrix in MATLAB? -

I'm essentially trying to get the matrix, a , and change it into matrix I have the values ​​in the first three columns of a I just want to sort out a in my first three columns. newMatrix = oldMatrix (:, 1: 3) It says, "I have a matrix called the old matrix. I want to store a subset of that matrix in a new matrix" and the brackets say what you want. The first colon represents "all the rows" and is a symbol of 1: 3 "column 1 to 3".

objective c - HTTP Server on iPhone that Supports Public Network? -

Do I currently use some file sharing in my iPhone app to know whether anyone connected to the phone How to use public IP address, which is to use the Internet instead of internal connection via WiFi. Any help would be appreciated! thank you in advanced. Some thoughts on running an HTTP server on an iPhone: Most of the time, with the IPv4 address, the IP address is known as the "net" address. Simply put, the used address can be used from other computers on the same network. Usually it can be used extensively not from the Internet. The IP can get very little money from the internet at a great cost. They are not present for wireless 3G networks. To compile and run web servers like Apache and LighthPit on an iPhone, however, the iPhone needs to jailbreak before running these servers (but it seems) To configure Apache, text files need to be edited, it is a great web server, but those who want to use it, they can read better document and text files handheld Wa...

How can I change resource files for a c# winform app, without changing the culture? -

We have a Wi-fi app that has been in development for some time. It has many images and control colors that create branded experience. We have a second customer who would like the same product, but with different branding. So we have lines of code in the control designer.cs files: this .BackgroundImage = global :: MyNameSpace.Properties.Resources.background; It seems that resource files are the way to go, because I can only change the culture and file a different resource with different images. Want to change T culture (I do not want to show the dates, currency etc.) to change it and it just smells. Can I manually change the resource file over time or compile at the time without changing the culture? Is there a better way to achieve this result? In addition, how you can use resource files to set control colors (such as all backgrounds to black to red) You can read in resources from a different file which was just a resource (but not dependent on globalized satel...

Does SQLite support store Procedures -

I am evaluating SQLite database for my needs. What SQLIte Store Processes Support? If yes, what are the limitations? Does the SLITE range support? Thanks Saurabh No, this is not what you see on the main site.

ruby on rails - Testing Authlogic Remember Me with Cucumber -

Has someone tried to test authlogic "Remember Me" functionality with cucumber? I'm not sure how to get a webrat for "closing a browser" to test perseverance. Just thought that maybe this requires selenium? A browser (like selenium) makes contact with rail applications more than I does). I will create a custom matcher such as: (then) I should be remembered by the application And then I'll check the DB or session, depending on how authlogic handles this feature.

c# - Sending Binary Data problem -

I am trying to send binary data from the database to an ASP.Net page. I can see that property data.landa is 2400, that means 2400 bytes, right? The strange thing is that when I get this data, the size is ~ 4kb, and appears to be corrupt. What can be any problem? byte [] data = proxy .get data (id); Response.Clear (); Response.AddHeader ("content-displacement", "attachment; file name = data.bin"); Response.AddHeader ("content-length", data-length.tostring ()); Response.ContentType = "app / octet-stream"; Response.Write (data); Response.Flush (); There are only 4 overloads of the response. Type: write public zero (four f); Write public null (object obj); Write public null (string s); Public Zero Write (four [buffer, int index, int count]; And I suspect that, your code ( response. (Data) ) Based on this, you are calling object obj overload what you have tried: feedback. BinaryWrite (data); This is specifically to write co...

codeigniter - get current array position while doing foreach $object->result_array() -

foreach $ object-> result_array () करते समय मौजूदा सरणी स्थिति सूचक प्राप्त करें, हाय, इस पर विचार करें , एक केस। foreach ($ object- & gt; परिणाम_अरे ($ $ rs) के रूप में) {// मैं वर्तमान सरणी तत्व सूचकांक को कैसे दिखाता हूँ जो चलना सूचकांक है // मैं एक फ़ंक्शन कॉल करना चाहता हूं जब इटरेटर आखिरी -1 स्थिति में है // और अधिक विशेष रूप से मैं इसे इस जगह में इस्तेमाल करना चाहता हूं और (;;) लूपों के लिए अन्य नहीं // और यहां तक ​​कि यह अन्य लूपों के साथ एक उदाहरण है, जो ठीक है। } एक विकल्प होना चाहिए या वर्तमान () फ़ंक्शन का उपयोग कर होना चाहिए। मैंने कोशिश की थी लेकिन फिर भी मुझे कुछ विश्लेषण करना है ... सरणी तत्वों को डीबग करना और अनुरेखण के बजाय मैं यह धागा पोस्ट कर रहा हूं। और इसके बाद भी सब के लिए यह लूप के साथ करना संभव है? जोड़ें = & gt; $ कुंजी इस तरह की कुंजी भी प्राप्त करने के लिए: foreach ($ object- & gt; परिणाम_अरे ($ $ rs = & gt; $ key के रूप में) {echo $ key; } और इसके बाद भी ऐसा करने के लिए लूप के साथ करना संभव है? हाँ ऐसा है:...

cocoa - Simple Sockets in Objective-C -

I have had difficulty finding simple guides / examples for original sockets in Objective-C (using NSF File Handle or CFS ocket / using NSCK Port). CSNetwork). Can a guide or some useful example suggest? I appreciate it! I have tried to use, but it is incomplete thanks! P.S. I have been stuck in this part of my project for a little while and am frustrated for some help. The easiest way to do this is to cocoa async socket class: It is very straight forward to use, this includes good HTML documentation.

java - How to modify trace service programmingly at runtime in Websphere V7? -

As you know, there is a function to configure the log in Admin console in V7. But, I want to modify these configurations through my code. So, is this some API available, which helps me to implement under V7? Thank you Joseph You can see and update trace strings through that interface To use.

string formatting django -

How do I access more than one variable at different positions? Thank you! Here is the code: Import HTTPPOS from Django.http import. Digengo.context.ed Import from the models. Import user from favorites. Import * def main_page_favorites (request): title = favorite.bizzets.jet (id = 1) .title.upper () email = User.objects.get (user name = 'm'). Email Image = HyperLink.Obages GAT (id = 3) .URL output = '' '& lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Connecting to the model & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1 & gt; Connecting to the model & lt; / H1> We will use this model to connect to the model & Lt; P & gt; This is the title of the first favorite:% s & lt; / P & gt; & Lt; / Body & gt; > Not sure what you are asking Do you just want to put multiple values ​​in your string? "Value is 1% s, value is 2% s." % (Value1, v...

iphone - Auto-rotation on navigationBar -

I have found a navigationbar that does not automatically resize the device when rotating it is. That's why the navigation bar puts it's portrait height of 44 pixels and does not shrink to 32 pixels. I am using a custom UITabBarController subclass which initializes the UINavigationController s and Adds them to its viewControllers array because I am adding UIImageView as a custom background for the navigation bar - which is good when rotating Updating like - my favorites Under the view, I always see 12 pixels difference, this variation overrides UITableView with 12 pixels, so everything works just fine - except simple UINavigationBar . Has anyone ever had this problem and got a solution? Thank you - -f OK, answered my question and my Worked for But I still can not believe that this is the right solution, because the templates do it automatically in the right way.

c# - How to generate a treeview in ASP.NET? -

How to generate a tree view in asp.net? In my asp.net project, I need a tree view structure, the format below ASP.NET does one that you can use to show that a Treeview is very similar to display. If you need the checkbox on each treeview node, but the ShowCheckBoxes attribute in the appropriate settings (i.e. ShowCheckBoxes = "All" / Code >> About the nodes themselves, you can bind to TreeView for a datasource which is either an XML document Alternatively, you can add the program itself to the code in the code: TreeNode tn = new TreeNode (); Tn.Value = "Cities"; TreeView1. Nodes.Add (tn); tn.ChildNodes.Add (New Triode ("Cochin 1")); [etc. etc.] There are some other useful links:

python - Finding the user who uses my django web application -

I have developed a smalldegango web application. It still runs on the Django Development Web Server. It has been decided that if the number of users is more than 'N', then it will be approved. I want to find all users looking at my user How can I find a user who sees my application? Since I was a user who had applied, all the Python methods of getting usernames only return my name. Please help. You can see the admin how many usernames are present, thinking that everyone likes it , Makes one of them or you can see your server logs and count unique IPs.

vb.net - list view files in .NET -

How can the files opened in VB.NET be listed? Open files should be in the list view on the left side of the GUI. You can track open files manually, for example, by placing a collection in which Their names are included once a new file is opened, a new item containing the file path is added to the archive. When a specific file is closed, that item is removed from the collection. Note: The collection I'm talking about can be different data for specific files, not just the file path. You have been given that archive, you can easily tie it in a list view control.

c# - Change Page when entering fullscreen mode -

My problem is quite simple: when the user changes the selection in a list box, let me go to fullscreen mode App is needed, but I need to change the displayed page I am using Silverlight 4 Private Zero MainListBox_SelectionChanged (Object Sender, SelectionChangedEventArgs E) {PresentationPage currentPresentationPage = new PresentationPage () ; App.Current.RootVisual = Current presentation page; App.Current.Host.Content.IsFullScreen = True; } The above code is executed, the app goes to the whole screen, but the page does not change, it only resizes the shape Can someone tell me that the code What's wrong in Thanks You can not change it after Application.RootVisual . What do you need to do, which includes a panel that you can change your content and make that panel your own RootVisual . Private Zero MainListBox_SelectionChanged (Object Sender, SelectionChangedEventArgs e) {Presentation Page Present Presentation Page = New Presentation Page (); (In the form of App.C...

regex - Best practices for localization -

Hi there, I'm localizing my application For some client-side verification I have some Reggae X (English) is expression. If I want to be localized for non-English, then what should be the best way to get pre-REG for all the languages ​​selected for localization Comments \ Suggestions appreciated Thank you DE Different language input will be the best route stored in external resource files you are doing. Net development, you can use resource files if you are doing Java, you can use property files.

c# - How do I get custom dialog close without showing graphics artifacts? -

I have a custom window model form with the following event code: private void BtnCancel_Click (object sender, event events e) {Close (); _result = DialogResult.OK; } The problem occurs when I click OK, which triggers some process-deep content (report generation) and is taken partially on the form screen. This report is taking precedence over the window fresh like the generation. Do I have to do something else to make it disappear before the process-intensive code? It will definitely annoy my users. Edit # 1: I am trying to work on the trigger method and passing the Shodiogyog in the dialog owner. For my case, the calling method is not a form. Therefore, I am trying to create IWin32Owner from the main window handle of the process so that I can pass it in the ShowDialog method. public class WindowWrapper: System.Windows.Forms.IWin32Window {public WindowWrapper (IntPtr handle) {_hwnd = handle; } Public IntPtr handle {get {return _hwnd; }} Private IntPtr _hwnd; } // Call...

objective c - Failure to write NSString to file on iPad -

I am using a text file to save changes made by a user (the reason is that I am doing this because I can upload a text file later on the PC, and put it in an Excel spreadsheet from there. I have 3 data structures: a NSMutableArray key, and a NSMutableDictionary which is the key value of MSMutableArrays's NSStrings. I repeat through these data structures and a file string compilation that looks like this: (key); (Value) \ t (value) \ t (value): \ n (key); (Value) .. so for now So, on the original question: when I try to save it, it fails. I am 99% sure that this is due to the path of the file I am using, but I have to see that to see the backup. The code is as follows: NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString * filePath = [Path ObjectAddIndex: 0]; NSString * file string = [NSString stringWithString: [tofileString]]; If (! [FileString writeToFile: file path atom: yes encoding: NSUTF8 string encoding erro...

SQL in MS-Access: Using COUNT, JOIN and returning 0s -

Apologies for this post, but although there are some examples on the site, I can not just get to do my work . / P> Then I have two tables: A telephony table id | Name | Grade Id 1 Richard 1 2 Allen 1 3 Peter I also have a grade table: id | Name 1 1 2 2 3 3 4 4 5 5 Anyway, I am trying to use COUNT () and return any 0 using the telephony table, using the following query Return, in which the following query is used: SELECT telephony. GridID, COUNT (*) Telephony with a telfoni LEFT joining grade. Graded = Grade. Telephony by ID Group Grid-order from Order 1; This query meets all but will not return all grades with 0 entries: grade | Total 1 2 Please help me I am using Microsoft Access 2003. Thank you for all your help Any thoughts? Thanks > I think that's what you want: BTW: "name" is a bad name for a column because it's a reserved word.

c# - Mapping Objects -

For example, what is the best solution for a lightweight class object in mapping class objects: CustomerDTO The customer has the same property names as both of them, I was thinking of the best optimized solution for mapping between them, I know that reflection makes me slow down, and it takes time to make the methods of all mapping so that Any idea Thanks in advance. . There is even more

java - Locking a file for an individual Thread within a VM -

I have several threads that are sorting my 'data' objects in files. File name object class data {org.joda.DateTime time is based on 2 fields; String title; Public string getFilename () {return time.toString () + '_' + title + ".xml"; } It is possible that 2 data objects will have the same 'time' and 'title', and similar file names. It is acceptable, and I am happy for it or have to be saved (they are probably the same data object, if it is the same) My problem is that two (or More) Threads are writing the file at the same time, due to which the faulty XML is. I had a look at java.nio.channels.FileLock, but it is for VM-wide locking, and is not particularly suitable for thread locking. I can synchronize on DataIO.class (but this would be the reason for a huge overhead because I really want to synchronize only on individual files). Synchronizing the file object will be useless, because multiple file objects can represent the sam...

perl - Tie::IxHash ordered associative arrays in Hash of Hashes? -

How can I keep that order in which hash elements were added for the second version? (hash of hash) For example: Use tie: IxHash; My% hash; Tie% hash, "tie :: IxHash"; My $ num (0 ..5) {$ hash {"firstwell $ num"} for ++; } My $ num (0 ..5) {$ hash {"firstly valid"} {"secondval $ num"} ++; } Print dumper (% hash); On removing the result, the $ VAR14 entry order was not protected: $ VAR1 = 'Firstwell'; $ VAR2 = 1; $ VAR3 = 'First Wall 1'; $ VAR4 = 1; $ VAR5 = 'First valve 2'; $ VAR6 = 1; $ VAR7 = 'Firstwal 3'; $ VAR8 = 1; $ VAR9 = 'First valve 4'; $ VAR10 = 1; $ VAR11 = 'First valve 5'; $ VAR12 = 1; $ VAR13 = 'First Wallyfx'; $ VAR14 = {'Second Val 5' = & gt; 1, 'Second Val 4' = & gt; 1, 'second val 2' = & gt; 1, 'Second Val 1' = & gt; 1, 'second val 3' = & gt; 1, 'second val 0' = & gt; 1}; I know that I...

recursion - PHP recursive function, to create site navigation as nested list, but without unnecessary menu items -

I dig out the idea of ​​using the recursive function to create my site menu but I have a problem and my age Head for now I need my menu function to return the nested list, but I do not want to display non-active irelevent elements of the tree. Description I have a mass SQL database that is placed with a table called menu_items, which contains all the common fields for each NAV item (target, link_text, title, etc.) Stores a unique ID for the item and importantly parent_id. This is everything for debate, for example, for example, is it easy to store this information in an XML file? For example, there is an example menu with all the elements shown here: & lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "1.html" & gt; Link 1 & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "1-1.html" & gt; Link 1-1 & lt; / A & gt; & Lt; Li & gt; & Lt; A href = "1-2.html" & gt; L...

windows - Plink does not source bashrc or bash_profile on connect -

I am trying to use plink as a SSH option on the stretch, but I think that when the eyelid Remote Linux connects to the machine, this source is not .bash_profile or .bashrc. Should I Make a Different Dot File? Or is there another option? For example, my bashrc file adds a directory on my path. > Where it will: Okay, but it appears that the source will not file either by plink sending only one command. Is there any remedy? If you connect a remote host via ssh or plink, then the default of the login account The shell will start. If that is the shell, then bash will automatically be the source. Bash_profile If you are asking a remote host to execute a command via ssh or plink, then just try to execute that command. What you want to achieve can be done by using ForcedCommand See also here: Set the compulsory command to do 2 things as a script: Run the original command (env vars $ SSH_ORIGINAL_COMMAND or $ SSH2_ORIGINAL_CO...

.net - How can I mock an internal interface using NMock2? -

itemprop = "text"> If I try this, I get only one exception: System.TypeLoadException: Access is prohibited: 'Namespace' Making the interface public is not an acceptable solution. I do not want to change the visibility of my API to check it. I found the answer: Nmk 2, (and other funky frameworks) Will create mock objects in dynamically-generated assemblies. In order to make the fake item order for the funky structure, the internal should be visible to these assemblies Just add the following declarations to the AssemblyInfo.cs class for the module under Test. // Allow unit testing and mock assemblies to view internal members. [Assembly: InternalsVisibleTo ("MyAssembly.UnitTest")] [Assembly: InternalsVisibleTo ("NMock2")] [Assembly: InternalsVisibleTo ("Mocks")] [Assembly: InternalsVisibleTo ("MockObjects")]

javascript - Google Maps fitBounds is not working properly -

मेरे पास googlemaps फिटबॉन्ड फंक्शन के साथ एक समस्या है। के लिए (var i = 0; I & lt; countries.length; i ++) {var देश = देश [i]; Var latlng = नया google.maps.LatLng (parseFloat (country.lat), parseFloat (country.lng)); mapBounds.extend (latlng); } Map.fitBounds (mapBounds); कुछ आइकन व्यूपोर्ट / दृश्यमान क्षेत्र के बाहर प्रदर्शित होंगे। और विचार? अग्रिम धन्यवाद। फिट बाउंड्स () पर लागू होगा विधि। & lt;! DOCTYPE html & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; मेटा http-equiv = "content-type" content = "text / html; charset = UTF-8" / & gt; & Lt; title & gt; Google मानचित्र LatLngBounds.extend () डेमो & lt; / title & gt; & Lt; script src = "http://maps.google.com/maps/api/js?sensor=false" प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; & lt; / script & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; div id = "map" शैली = "चौड़ाई: 4...

mysql - mysqlnd driver in PHP 5.3.2 on Ubuntu 10.04 -

I am trying to get mysqlnd driver setup on php5.3.2 (default version) on Ubuntu 10.04 (Lucid). PHP Docs says that mysqlnd is compiled by default in 5.3 Build. But I have not found a way to make it a part of the merit building. Add this line to the sources in the package manager deb http : //security.ubuntu.com/ubuntu Precise-security main universe then install the package

language agnostic - Mafia Wars Web Game -

I'm planning to start web app development. (HTML, CSS and PHP) I want to create a mafia war style game for the web. Static graphics are played using the game buttons. This will be a database to store statistics and a set of buttons. Will it be very difficult to start a whole web development? Will Javascript also be necessary for this? Yes it will be very difficult for a complete start up. Where to get started = Learning the program If you have some other background (General CS Knowledge, Database Experience) then you can probably do this. Javascript is not necessary for what you describe. I will suggest you go through some tutorials on web application development so that you can understand the basic concepts, and then decide whether you know enough to start building your game app. Here are some tutorials for various development environments: You might at least Read through some of them that you should know.

Eclipse CDT variable colors in editor -

I hope this is a good question to ask here. This programming is related, so I thought it would be better than the superuser, so I am using the CDT C ++ Eclipse plugin. I know how the editor changes colors for some things But is there a way to do that all the variables are different colors? For example in KDEValue, it sets the local variables and square variables in different colors and bold square squares. Can I copy it to CDT? Eclips provides some level of color customization for text editor syntax You can see it on the following: There are many elements, including the Window> Preferences> C / C ++> Editor> Syntax color code that can be changed, assembly, Comments, Preprocessor and Doxian Under the code, it is possible to change the color of some variable types, such as global variables, local variable announcements, local variable references, and parameter variables. But I do not think the code is capable of changing the color of each variable declared....

database - Python DBM Module for Windows? -

I would like to use the DBM module on my Windows machine, but it is currently only supported on UNIX. Is anyone aware of syntax similar to the same module or is there an alternative solution for making DBB functional on Windows? Being able to access the database written on the hard drive, how can I use a dictionary like this would be great thanks for your help! Actually, after more turnip, I found out: I have tried this on windows and it is working fine =)

c# - What is an easy way to append or prepend a single value to an IEnumerable<T>? -

Let me know an IEnumerable (in this case, IEnumerable & lt; string [] & gt; / code>). To do this, I would like to combine first value with list : : // Together headers and data simultaneously mobile & Lt; String []> Header = new list & lt; String []> {GetHeaders ()}; Var all = header Canakat (gatedata); Yuk is a better way? And how do you handle the case against adding value? I've written custom extension methods to do this: Public stable IEnumerable & lt; T & gt; Endend & lt; T & gt; (This IEnumerable & lt; T & gt; source, T item) {foreach (source i) yield yield i; Yield returns item; } Public stable IEnumerable & lt; T & gt; Prepaid & lt; T & gt; (This IEnumerable & lt; T & gt; source, t item) {yield returns item; Foreign Currency (T in Source) yield returns i; } In your scenario, you will type: var all = GetData (). Prepare (GetHeaders ()); As Chiltemp commented, it does not ch...

flash - Trying to understand Adobe AIR and full screen mode -

says that: In Flash Player, full-screen mode only via In response to mouse clicks (including right click) or keypress, the Action Script Application Security sandbox does not require running AIR content to enter full-screen mode in response to the user's prompt. I thought there was a development tool. But the above text looks like this is either a player, because it is comparing to the Flash Player. So, is Arre both development tools and a player? AIR is not a development tool but is an application runtime that allows a Flex / Action Script application to be a browser Allows to run as a desktop application instead of a window. One advantage of compiling your app as an AIR app is that this security is not limited by the sandbox that comes with a code running in a browser. This means that you can read the files, go into the fullscreen mode without interruption, etc. On Downside, the user needs to install your app (as well as air runtime, if not already installed) on ...

Getting last modified info from files with PHP when filemtime, stat['mtime'], and get_headers fail -

I am trying to display the images in reverse order when they were last modified. Unfortunately, get_headers () only works for URLs, and both states ['meet'] and filemate () fail for me Do I have any other methods to get the last modified information for a file? At the moment my code is: if (isset ($ _ GET ['start']) and "true" === $ _GET ['start']) {$ images = array (); If ($ dir = dir ('images')) {$ count = 0; While (wrong! == ($ file = $ dir-> read ()) {if_dir ($ file) & amp; $ File! == '.' & Amp; Amp; $ File! == '..' & amp; (Substr ($ file, -3) === 'jpg' || substrate ($ file, -3) === 'png' || substr ($ file, -3) === 'GIF')) { $ LastModified = filemtime ($ file); $ Image [$ lastModified] = $ file; ++ $ count; }} Echo json_encode ($ Picture); } Else {echo "directory could not be opened"; }} Before you call the file code, enter filemtime ($ file) ) . Try $ lastMod...

python - How do I do conditional array arithmetic on a numpy array? -

I'm trying to get better hold of numpy arrays, so I have a sample question to ask them: Say I'm called a lower array. I want to execute those values ​​on those increments which are less than 0 and the rest leave alone, for example, if I was: a = np.array ([ 1,2,3, -1, -2, -3]) I would like to return: ([1,2,3, 0, -1, -2]) What is the most compact syntax for this? Thank you! in [45]: a = np.array ([1,2,3, -1, -2, -3]) in [46]: one [a & lt; 0] + = 1 in [47]: One out [47]: array ([1, 2, 3, 0, -1, -2])

How do you suppress GCC linker warnings? -

I recently went to a campaign to eliminate warnings from my code and became familiar with the GCC alert flag (E.g., -Wall , -no-> warning to disable> , -fdiagnostics-show-option , etc. ). Although I did not understand how to disable (or even control) Linker Alerts The most common linker warning I was getting is the following: LD: Warning: & lt; Some symbols & gt; & Lt; Path / to / library.a & gt; Has different visibility (default) and (hidden) & lt; Path / to / my / class.o & gt; I was getting this reason because this library I was using was created using default visibility, while my app was hidden Visibility I have fixed it by rebuilding the library with hidden visibility. My question is: If I want to stop that warning? It's nothing like what I have to do now, I know how to fix it, but I'm still curious how would you suppress that particular warning - or any linker warnings in general? Using the -fdiagnostics-show-option for ...

cocoa - Switch between NSView -

I have an NSView with two scenes. I'm trying to hide a scene and show it to another, but The scene will not change. I tried to include set-ended, deleted previews, subviews in front, everything. The first scene is still and no one else will show itself. Am I doing something wrong? Thank you, -Albe As long as there is a connection to each sub-view ( IBOutlet ), then you [superView replaceSubview: with oldView: newView]; .

java - How does glassfish use ManagedObjectManagers? -

Does anyone know how to use the Glasfis Manejeted object manager? formula exception "thread -14" java.lang.NoClassDefFoundError: org to com.sun.xml.ws.client.Stub / glassfish / gmbal / ManagedObjectManager I get the following exception. & Lt; Init & gt; At com.sun.xml.ws.client.Stub (Stub.java:196). & Lt; Init & gt; At com.sun.xml.ws.client.sei.SEIStub (Stub.java:174). & Lt; Init & gt; On com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy (WSServiceDelegate.java:602) on com.sun.xml.ws.client.WSServiceDelegate.getPort (SEIStub.java:81) (WSServiceDelegate.java: javax.xml on com.sun.xml.ws.client.WSServiceDelegate.getPort (WSServiceDelegate.java:326) on com.sun.xml.ws.client.WSServiceDelegate.getPort (WSServiceDelegate.java:308) 344). ws.Service.getPort on project.CollectionManagementService.getCollectionManagementPort (Service.java:92) (CollectionManagementService.java:55) When I call the following method: @ Vebandpoint (name ...