Posts

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: ...