Search Results

Search found 12900 results on 516 pages for 'rules engine'.

Page 68/516 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • Googles App Engine, Python: How to get parameters from a log-in pages?

    - by brilliant
    Here is a quote from here: So in short ... you need to look into login page, see what params it uses e.g login=xxx, password=yyy, post it to that page and you will have to manage the cookies too, that is where library like twill etc come into picture. How could I do it using Python and Google App Engine? Can anybody please give me some clue? I have already asked a question about the authenticated request, but here it seems the matter is different as here I am suggested to look into login page and get parameters, and also I have to deal with cookies.

    Read the article

  • how to create an excel file in google app engine (java)?

    - by Joseph
    A question that seems to have quite a few options for Python, but none for Java after googling for two days. Really really could use some help all I have found so far is a recommendation to use gaeVFS to build an excel file from the xml components and then zip it all together which sounds like a slap in the face. Oh yes and if you were wondering I am questioning my use of Java rather than python but at 5,000 lines of code it would be insane to turn back now... Other things you might find useful Client: GWT Server: Servlets running on google app engine storing data into the google data store Excel file: mandatory, CSV isn't good enough, no need to save the file just to be able to "serve" it to the client i.e. open a "Save As" box.

    Read the article

  • Does Google App Engine allow creation of files and folders on the server ?

    - by Frank
    I know Google App Engine offers free space, but I wonder if it's for storing data in it's database only or does it also allow me to create files and directories on the server side to store my data ? For instance can I use the following method to save file ? public static void saveFile(String File_Path,StringBuffer Str_Buf,boolean Append) { FileOutputStream fos=null; BufferedOutputStream bos=null; try { fos=new FileOutputStream(File_Path,Append); bos=new BufferedOutputStream(fos); for (int j=0;j<Str_Buf.length();j++) bos.write(Str_Buf.charAt(j)); } catch (Exception e) { e.printStackTrace(); } finally { try { if (bos!=null) { bos.close(); bos=null; } if (fos!=null) { fos.close(); fos=null; } } catch (Exception ex) { ex.printStackTrace(); } } } Frank

    Read the article

  • how to format date when i load data from google-app-engine..

    - by zjm1126
    i use remote_api to load data from google-app-engine. appcfg.py download_data --config_file=helloworld/GreetingLoad.py --filename=a.csv --kind=Greeting helloworld the setting is: class AlbumExporter(bulkloader.Exporter): def __init__(self): bulkloader.Exporter.__init__(self, 'Greeting', [('author', str, None), ('content', str, None), ('date', str, None), ]) exporters = [AlbumExporter] and i download a.csv is : the date is not readable , and the date in appspot.com admin is : so how to get the full date ?? thanks i change this : class AlbumExporter(bulkloader.Exporter): def __init__(self): bulkloader.Exporter.__init__(self, 'Greeting', [('author', str, None), ('content', str, None), ('date', lambda x: datetime.datetime.strptime(x, '%m/%d/%Y').date(), None), ]) exporters = [AlbumExporter] but the error is :

    Read the article

  • Why can't I see any data in the Google App Engine *Development* Console?

    - by willem
    I run my google app engine application in one of two ways... Directly by using the application from http://localhost:8080 Or execute unit tests from http://localhost:8080/test When I create entities by using the application directly, the data is visible in the Development Console (dataStore view). However, when I execute the unit tests... even if they succeed and I can put() and get() data, the data does not show in the dataStore view. Any idea why I can't see my data? Even though it is there? Notes: I use GAEUnit for unit tests. the data stored mostly consists of StringProperties(). I use Python and run Django on top of the GAE, don't know if that matters.

    Read the article

  • How to use pom.xml/Maven to initialize a local thoughtsite (App Engine sample) project in Eclipse?

    - by ovr
    This sample app ("thoughtsite") for App Engine contains a pom.xml in its trunk: http://code.google.com/p/thoughtsite/source/browse/#svn/trunk But I don't know what command to run in Maven to set up the project locally. (The README doesn't mention anything about Maven.) I tried to just import the project code directly into Eclipse but it doesn't look like it's in an appropriate format for a direct import. So I assume I need to do something with Maven to get it set up correctly. I haven't really used Maven before so I'm not sure what command I would need to run to set everything up. The pom.xml seems like it downloads a bunch of dependencies for the project like the Spring jar files which I don't see anywhere else in the svn repository.

    Read the article

  • Google App Engine - What causes cold start latency time to be high, even though my CPU usage is rela

    - by Spines
    I've optimized my code to use only lightweight libraries. I'm even using the low level datastore rather than JDO. And my cold start CPU usage has dropped from about 5 seconds to about 1.5 seconds. However, the time it takes to respond is often about 4.5 seconds, though it varies a lot. Here are some lines from my logs: 03-19 09:16PM 57.368 /donothing 200 4506ms 1516cpu_ms 0kb Mozilla/5.0 03-19 09:22PM 54.884 /donothing 200 4452ms 1477cpu_ms 0kb Mozilla/5.0 What is the app engine doing for those extra 3 seconds that apparently isn't using any CPU?

    Read the article

  • Bulk get of child entities on Google app engine?

    - by dfrankow
    On Google App Engine in Python, I have a Visit entity that has a parent of Patient. A Patient may have multiple visits. I need to set the most_recent_visit (and some auxiliary visit data) somewhere for later querying, probably in another child entity that Brett Slatkin might call a "relationship index entity." I wish to do so in a bulk style as follows: 1. get 100 Patient keys 2. get all Visits that have any of the Patients from 1 as an ancestor 3. go through the Visits and get the latest for each Patient Is there any way to perform step 2 in a bulk get? I know there is a way to bulk get entities from a list of keys, and there is a way to match a single entity by its ancestor.

    Read the article

  • Is there a graphics/game engine that supports PC & Mac?

    - by Chris Masterton
    Is their a graphics that runs on both Mac & PC? I've seen Unity and thats a possibility, I'm wondering if there are any other choices. Ideally I want to port the same C++ game code to both PC & Mac platforms, but let the underlying game/graphics engine take advantage of the appropriate hardware. edit: I'm looking on the level of Torque, Gamebryo & Unreal. A commercial solution is perfectly acceptable. Thanks, Chris

    Read the article

  • Google App Engine update an object from servlet not working ?

    - by Frank
    I use the following code to update an object from servlet in Google App Engine : String Time_Stamp=Get_Date_Format(6),query="select from "+Contact_Info_Entry.class.getName()+" where Contact_Id == '"+Contact_Id+"' order by Contact_Id desc"; PersistenceManager pm=null; try { pm=PMF.get().getPersistenceManager(); // note that this returns a list, there could be multiple, DataStore does not ensure uniqueness for non-primary key fields List<Contact_Info_Entry> results=(List<Contact_Info_Entry>)pm.newQuery(query).execute(); Contact_Info_Entry A_Contact_Entry=results.get(0); A_Contact_Entry.Extra_10=Time_Stamp; pm.makePersistent(A_Contact_Entry); } catch (Exception e) { Send_Email(Email_From,Email_To,"Check_License_Servlet Error [ "+Time_Stamp+" ]",new Text(e.toString()+"\n"+Get_Stack_Trace(e)),null); } finally { pm.close(); } The value "[ 2010-05-13 Thu 15:58:31 ]" was in A_Contact_Entry.Extra_10, but it seems "pm.makePersistent(A_Contact_Entry);" was not executed. The object was not updated and there was no error message, why ? How to fix it ?

    Read the article

  • Google App Engine - About how much quota does a single datastore put use?

    - by Spines
    The latency for a datastore put is about 150ms (http://code.google.com/status/appengine/detail/datastore/2010/03/11#ae-trust-detail-datastore-put-latency). About how much CPUTime is used by a single datastore put with data size of 100 bytes, into an entity that has only 2 columns, and no indexes? I plan to do some testing with this later today to figure it out, but if anyone already knows that would help me out :). Also, does anyone know about how much extra overhead in CPUTime doing this datastore put through the task queue would be? Note: This is kind of a follow up to this question: http://stackoverflow.com/questions/2421075/google-app-engine-how-reliable-are-the-logs.

    Read the article

  • How to set a complex custom crontab in google-app-engine (java)?

    - by Shreeni
    I am building an app for which I need to set up cron jobs. What I want to do is to set the specific minutes in a hour where specific crons should run. For instance: Task1 at 1st minute of the hour Task2 on every second minute of the hour Task3 every 2 minute only in the second half of the hour Building this in the standard Unix cron format is reasonably straightforward, but could not figure out how to do it in the Google-App-Engine. The documentation does not list any non-trivial examples. Any suggestions on how to do it? Examples would be excellent.

    Read the article

  • Python wrapper for Google Maps making Google App Engine crash?

    - by user1679332
    I am currently trying to build a web app using Google App Engine that will involve using the Google Maps API. Since I am coding in python, I tried importing the python wrapper for Google Maps (found here); however, performing the import will cause my web app to crash. Are there any suggestions for how I can fix this problem? I'm guessing the crash might have something to do with the fact that I need to incorporate the google maps python wrapper into my application, but how do I go about doing that? Thanks!

    Read the article

  • app engine's back referencing is too slow. How can I make it faster?

    - by Ray Yun
    Google app engine has smart feature named back references and I usually iterate them where the traditional SQL's computed column need to be used. Just imagine that need to accumulate specific force's total hp. class Force(db.Model): hp = db.IntegerProperty() class UnitGroup(db.Model): force = db.ReferenceProperty(reference_class=Force,collection_name="groups") hp = db.IntegerProperty() class Unit(db.Model): group = db.ReferenceProperty(reference_class=UnitGroup,collection_name="units") hp = db.IntegerProperty() When I code like following, it was horribly slow (almost 3s) with 20 forces with single group - single unit. (I guess back-referencing force reload sub entities. Am I right?) def get_hp(self): hp = 0 for group in self.groups: group_hp = 0 for unit in group.units: group_hp += unit.hp hp += group_hp return hp How can I optimize this code? Please consider that there are more properties should be computed for each force/unit-groups and I don't want to save these collective properties to each entities. :)

    Read the article

  • What is the most efficient way to pass data (list of pairs of [Integer + Double]) between two Google App Engine instances?

    - by ruslan
    What is the most efficient way to pass data (list of pairs of [Integer, Double]) between two Google App Engine instances ? Currently I use Java binary serialization. Frontend servlet receives data from the client in JSON format. I convert it to byte[] using ObjectOutput.writeObject and then send it to backend servlet via HTTP POST. It's not in production yet. Should I just pass client's JSON as it is to backend? It seems more logical. But it's bigger in size. Or should I use Google Protocol Buffers as stated in this benchmark article ? Thank you!!!

    Read the article

  • How can I receive percent encoded slashes with Django on App Engine?

    - by J. Frankenstein
    I'm using Django with Google's App Engine. I want to send information to the server with percent encoded slashes. A request like http:/localhost/turtle/waxy%2Fsmooth that would match against a URL like r'^/turtle/(?P<type>([A-Za-z]|%2F)+)$'. The request gets to the server intact, but sometime before it is compared against the regex the %2F is converted into a forward slash. What can I do to stop the %2Fs from being converted into forward slashes? Thanks!

    Read the article

  • How to get google app engine logs in C#?

    - by Max
    I am trying to retrieve app engine logs the only result I get is "# next_offset=None", below is my code: internal string GetLogs() { string result = _connection.Get("/api/request_logs", GetPostParameters(null)); return result; } private Dictionary<string, string> GetPostParameters(Dictionary<string, string> customParameters) { Dictionary<string, string> parameters = new Dictionary<string, string>() { { "app_id", _settings.AppId }, { "version", _settings.Version.ToString() } }; if (customParameters != null) { foreach (string key in customParameters.Keys) { if (parameters.ContainsKey(key)) { parameters[key] = customParameters[key]; } else { parameters.Add(key, customParameters[key]); } } } return parameters; }

    Read the article

  • DirectAccess Server firewall rules blocking ports

    - by StormPooper
    I have configured DirectAccess on my Server 2012 Essentials box and most of it works great - I can remotely access the server via RDP and the default IIS website on port 80. However, I can't access anything that uses other ports. For this example, the Team Foundation Server website. The only way to access it is by accessing http://localhost:8080/tfs on the server directly - even when using http://servername:8080/tfs or http://192.168.1.100:8080/tfs won't work. I've tried adding the ports to the NAT exceptions using Set-NetNatTransitionConfiguration –IPv4AddressPortPool and while that has allowed some ports used internally (Deluge, for example) it hasn't allowed me access to the URL. I think I've narrowed it down to the "DirectAccess Server Settings" Group Policy that is created when configuring DirectAccess. When I disable the link for this GPO, the TFS site works again, but the default IIS site stops working (but RDP still works). I already have rules in the firewall on the server for TFS and before enabling this Group Policy (so before configuring DirectAccess) I could access both sites. Does anybody have any suggestions for things I can change to allow access to both? I've uploaded the full GPO report and my Remote Access Configuration Summary for more details.

    Read the article

  • Ubuntu Hardy : Testing for environment variables in udev rules doesn't seem to work

    - by Fred
    I have a Ubuntu 8.04 LTS (server edition), and I need to write a udev rule for it to act upon plugging a USB thumb drive. However, I need a different action depending on the filesystem of the drive. I know I can use the ID_FS_TYPE environment variable to check for the filesystem on the drive. Following instructions found here, I try a dummy udev rule as such : KERNEL!="sd[a-z][0-9]", GOTO="my_udev_rule_end" ACTION=="add", RUN+="/usr/bin/touch /tmp/test_udev_%E{ID_FS_TYPE}" ACTION=="add", ENV{ID_FS_TYPE}=="vfat", RUN+="/usr/bin/touch /tmp/test_udev_it_works" LABEL="my_udev_rule_end" However, when I plug in a thumb drive with a vfat filesystem (which should trigger both rules), I end up with a file called /tmp/test_udev_vfat, meaning the first rule was triggered successfully, and that the ID_FS_TYPE environment variable is "vfat", but I don't have the other file, meaning that although I know the ID_FS_TYPE env variable is "vfat", I can't seem to check against it for a match. I tried googling the thing, but pretty much every result seems to assume ENV{ID_FS_TYPE}=="vfat" works. I also tested the exact same udev rule on Ubuntu 10.04 LTS server, and I have the same result. I'm probably missing something very simple, but I just don't get it. Does anyone see what is wrong with my udev rule that would prevent it from matching on ENV{ID_FS_TYPE}? Thanks.

    Read the article

  • Different routing rules for a particular user using firewall mark and ip rule

    - by Paul Crowley
    Running Ubuntu 12.10 on amd64. I'm trying to set up different routing rules for a particular user. I understand that the right way to do this is to create a firewall rule that marks the packets for that user, and add a routing rule for that mark. Just to get testing going, I've added a rule that discards all packets as unreachable: # ip rule 0: from all lookup local 32765: from all fwmark 0x1 unreachable 32766: from all lookup main 32767: from all lookup default With this rule in place and all firewall chains in all tables empty and policy ACCEPT, I can still ping remote hosts just fine as any user. If I then add a rule to mark all packets and try to ping Google, it fails as expected # iptables -t mangle -F OUTPUT # iptables -t mangle -A OUTPUT -j MARK --set-mark 0x01 # ping www.google.com ping: unknown host www.google.com If I restrict this rule to the VPN user, it seems to have no effect. # iptables -t mangle -F OUTPUT # iptables -t mangle -A OUTPUT -j MARK --set-mark 0x01 -m owner --uid-owner vpn # sudo -u vpn ping www.google.com PING www.google.com (173.194.78.103) 56(84) bytes of data. 64 bytes from wg-in-f103.1e100.net (173.194.78.103): icmp_req=1 ttl=50 time=36.6 ms But it appears that the mark is being set, because if I add a rule to drop these packets in the firewall, it works: # iptables -t mangle -A OUTPUT -j DROP -m mark --mark 0x01 # sudo -u vpn ping www.google.com ping: unknown host www.google.com What am I missing? Thanks!

    Read the article

  • Different nginx rules based on referrer

    - by juana
    I'm using WordPress with WP Super Cache. I want visitors who come from Google (That inlcudes all country specific referrers like google.co.in, google.co.uk and etc.) to see uncached contents. There are my nginx rules which are not working the way I want: server { server_name website.com; location / { root /var/www/html/website.com; index index.php; if ($http_referer ~* (www.google.com|www.google.co) ) { rewrite . /index.php break; } if (-f $request_filename) { break; } set $supercache_file ''; set $supercache_uri $request_uri; if ($request_method = POST) { set $supercache_uri ''; } if ($query_string) { set $supercache_uri ''; } if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) { set $supercache_uri ''; } if ($supercache_uri ~ ^(.+)$) { set $supercache_file /wp-content/cache/supercache/$http_host/$1index.html; } if (-f $document_root$supercache_file) { rewrite ^(.*)$ $supercache_file break; } if (!-e $request_filename) { rewrite . /index.php last; } } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/html/website.com$fastcgi_script_name; include fastcgi_params; } } What should I do to achieve my goal?

    Read the article

  • htaccess rewrite rules in Nginx: setting the rewrite path

    - by ct2k7
    I have a htaccess file I'm trying to convert into an nignx config file. Here's my htaccess file. RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule !\.(jpg|css|js|gif|png)$ public/ [L] RewriteRule !\.(jpg|css|js|gif|png)$ public/index.php?url=$1 And the rules I have in my nginx config file: location / { if ($request_uri !~ "-f"){ rewrite !\.(jpg|css|js|gif|png)$ public/ break; } rewrite !\.(jpg|css|js|gif|png)$ public/index.php?url=$1; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { # Move to the @missing part when the file doesn't exist try_files $uri @missing; # Fix for server variables that behave differently under nginx/$ fastcgi_split_path_info ^(.+\.php)(/.+)$; # Include the standard fastcgi_params file included with ngingx include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_index index.php; # Pass to upstream PHP-FPM; This must match whater you name you$ #fastcgi_pass phpfpm; fastcgi_pass 127.0.0.1:9000; } location @missing { rewrite ^(.*)$ public/index.php?url=$1 break; } However, when I hit /, I get a 403 Forbidden, but I can get to /public/index.php, thus the rewrite isn't working. Any ideas on what I'm doing wrong?

    Read the article

  • fail2ban block ports rules iptable

    - by J Spen
    I just installed Ubuntu Server 14.04 and don't have much experience with IPtables. I am trying to get a basic setup going where I only accept SSH connections on port 22 and 2222. I actually have that working with no problem using fail2ban ssh. Then I wanted to block all other ports except 423 and 4242 but either method of DROPing all connections that are not listed seems not to work and it blocks me out of everything. Below is the setup that works: -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -N fail2ban-ssh -A INPUT -p tcp -m multiport --dports 22,2222 -j fail2ban-ssh -A fail2ban-ssh -j RETURN I tried to change it either to: -P INPUT DROP -P FORWARD ACCEPT -P OUTPUT ACCEPT -N fail2ban-ssh -A INPUT -p tcp -m multiport --dports 22,2222 -j fail2ban-ssh -A fail2ban-ssh -j RETURN or: -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -N fail2ban-ssh -A INPUT -p tcp -m multiport --dports 22,2222 -j fail2ban-ssh -A INPUT -j DROP -A fail2ban-ssh -j RETURN I have noticed that the rules for fail2ban-ssh are automatically added to my iptables on boot because if I save them with iptables-persistant they are entered twice. How do I go about blocking everything accept those 2 ports using fail2ban? Is it a bad fail2ban configuration or do I need to add the fail2ban-ssh -j Return somewhere else in my code.

    Read the article

  • Iptables rules, forward between two interfaces

    - by Marco
    i have a some difficulties in configuring my ubuntu server firewall ... my situation is this: eth0 - internet eth1 - lan1 eth2 - lan2 I want that clients from lan1 can't communicate with clients from lan2, except for some specific services. E.g. i want that clients in lan1 can ssh into client in lan2, but only that. Any other comunication is forbidden. So, i add this rules to iptables: #Block all traffic between lan, but permit traffic to internet iptables -I FORWARD -i eth1 -o ! eth0 -j DROP iptables -I FORWARD -i eth2 -o ! eth0 -j DROP # Accept ssh traffic from lan1 to client 192.168.20.2 in lan2 iptables -A FORWARD -i eth1 -o eth2 -p tcp --dport 22 -d 192.168.20.2 -j ACCEPT This didn't works. Doing iptables -L FORWARD -v i see: Chain FORWARD (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 33 144 DROP all -- eth1 !eth0 anywhere anywhere 0 0 DROP all -- eth2 !eth0 anywhere anywhere 23630 20M ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED 0 0 ACCEPT all -- eth1 any anywhere anywhere 175 9957 ACCEPT all -- eth1 any anywhere anywhere 107 6420 ACCEPT all -- eth2 any anywhere anywhere 0 0 ACCEPT all -- pptp+ any anywhere anywhere 0 0 ACCEPT all -- tun+ any anywhere anywhere 0 0 ACCEPT tcp -- eth1 eth2 anywhere server2.lan tcp dpt:ssh All packets are dropped, and the count of packets for the last rule is 0 ... How i have to modify my configuration? Thank you. Regards Marco

    Read the article

  • converting apache rewrite rules to nginx for xenforo

    - by nick
    Hi all, I am migrating some forums from vbulletin 3.8.x to xenforo, and trying to keep my old link structure alive. Basically, XF provides some php files that I can redirect the old url style to and it handles the proper 301 redirection. Regardless of that end, I am having difficulty rewriting the rules which I can only find defined in apache's rewrite style: RewriteRule [\d]+-[^/]+/.+-([\d]+)/([\d]+)/ showthread.php?t=$1&page=$2 [NC,L] RewriteRule [\d]+-[^/]+/.+-([\d]+)/ showthread.php?t=$1 [NC,L] RewriteRule ([\d]+)-[^/]+/([\d]+)/ forumdisplay.php?f=$1&page=$2 [NC,L] RewriteRule ([\d]+)-[^/]+/ forumdisplay.php?f=$1 [NC,L] I have been experimenting and thought this should work, but obviously not: if (!-e $request_filename) { rewrite [0-9a-zA-Z\-]/[0-9a-zA-Z\-]-([0-9])/([0-9])/ /showthread.php?t=$1&page=$2 last; rewrite [0-9a-zA-Z\-]/[0-9a-zA-Z\-]-([0-9])/ /showthread.php?t=$1 last; rewrite ([0-9])-[0-9a-zA-Z\-]/([0-9])/ /forumdisplay.php?f=$1&page=$2 last; rewrite ([0-9])-[0-9a-zA-Z\-]/ /forumdisplay.php?f=$1 last; rewrite ^(.*)$ /index.php last; } old vB showthread format: website.tld/233-website-issues-requests/wiki-down-73789/ new XF showthread format: website.tld/threads/the-wiki-is-down.65509/ old vB forumdisplay format: website.tld/233-website-issues-requests/ new XF forumdisplay format: website.tld/forums/website-issues-and-requests.253/

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >