Search Results

Search found 453 results on 19 pages for 'ali essam'.

Page 4/19 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Android source code not working, reading frame buffer through glReadPixels

    - by Muhammad Ali Rajput
    Hi, I am new to Android development and have an assignment to read frame buffer data after a specified interval of time. I have come up with the following code: public class mainActivity extends Activity { Bitmap mSavedBM; private EGL10 egl; private EGLDisplay display; private EGLConfig config; private EGLSurface surface; private EGLContext eglContext; private GL11 gl; protected int width, height; //Called when the activity is first created. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // get the screen width and height DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); int screenWidth = dm.widthPixels; int screenHeight = dm.heightPixels; String SCREENSHOT_DIR = "/screenshots"; initGLFr(); //GlView initialized. savePixels( 0, 10, screenWidth, screenHeight, gl); //this gets the screen to the mSavedBM. saveBitmap(mSavedBM, SCREENSHOT_DIR, "capturedImage"); //Now we need to save the bitmap (the screen capture) to some location. setContentView(R.layout.main); //This displays the content on the screen } private void initGLFr() { egl = (EGL10) EGLContext.getEGL(); display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); int[] ver = new int[2]; egl.eglInitialize(display, ver); int[] configSpec = {EGL10.EGL_NONE}; EGLConfig[] configOut = new EGLConfig[1]; int[] nConfig = new int[1]; egl.eglChooseConfig(display, configSpec, configOut, 1, nConfig); config = configOut[0]; eglContext = egl.eglCreateContext(display, config, EGL10.EGL_NO_CONTEXT, null); surface = egl.eglCreateWindowSurface(display, config, SurfaceHolder.SURFACE_TYPE_GPU, null); egl.eglMakeCurrent(display, surface, surface, eglContext); gl = (GL11) eglContext.getGL(); } public void savePixels(int x, int y, int w, int h, GL10 gl) { if (gl == null) return; synchronized (this) { if (mSavedBM != null) { mSavedBM.recycle(); mSavedBM = null; } } int b[] = new int[w * (y + h)]; int bt[] = new int[w * h]; IntBuffer ib = IntBuffer.wrap(b); ib.position(0); gl.glReadPixels(x, 0, w, y + h, GL10.GL_RGBA,GL10.GL_UNSIGNED_BYTE,ib); for (int i = 0, k = 0; i < h; i++, k++) { //OpenGLbitmap is incompatible with Android bitmap //and so, some corrections need to be done. for (int j = 0; j < w; j++) { int pix = b[i * w + j]; int pb = (pix >> 16) & 0xff; int pr = (pix << 16) & 0x00ff0000; int pix1 = (pix & 0xff00ff00) | pr | pb; bt[(h - k - 1) * w + j] = pix1; } } Bitmap sb = Bitmap.createBitmap(bt, w, h, Bitmap.Config.ARGB_8888); synchronized (this) { mSavedBM = sb; } } static String saveBitmap(Bitmap bitmap, String dir, String baseName) { try { File sdcard = Environment.getExternalStorageDirectory(); File pictureDir = new File(sdcard, dir); pictureDir.mkdirs(); File f = null; for (int i = 1; i < 200; ++i) { String name = baseName + i + ".png"; f = new File(pictureDir, name); if (!f.exists()) { break; } } if (!f.exists()) { String name = f.getAbsolutePath(); FileOutputStream fos = new FileOutputStream(name); bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos); fos.flush(); fos.close(); return name; } } catch (Exception e) { } finally { //if (fos != null) { // fos.close(); // } } return null; } } Also, if some one can direct me to better way to read the framebuffer it would be great. I am using Android 2.2 and virtual device of API level 8. I have gone through many previous discussions and have found that we can not know read frame buffer directly throuh the "/dev/graphics/fb0". Thanks, Muhammad Ali

    Read the article

  • Run a JGNAT program?

    - by anta40
    I just installed JGNAT on Windows (gnat-gpl-2010-jvm-bin.exe) This is a sample code hello.adb from the included manual: with Ada.Text_IO; use Ada.Text_IO; procedure Hello is begin Put_Line ("Hello GNAT for the JVM."); end Hello; First, compile it: jvm-gnatmake hello.adb jvm-gnatcompile -c hello.adb jvm-gnatbind -x hello.ali jvm-gnatlink hello.ali Looks fine. So let's run it: java hello Exception in thread "main" java.lang.NoClassDefFoundError: jgnat/adalib/GNAT_libc at hello.main(hello.adb) Caused by: java.lang.ClassNotFoundException: jgnat.adalib.GNAT_libc at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more Any idea why?

    Read the article

  • mysql utf8 turkish characters not correct recognized

    - by sabri.arslan
    Hello, In mysql utf8 coded turkish data i can't search "I" and "i". when i search its giving result contains "Y" or "y". Because in latin1 "I" displaying as "Ý" and "i" as "ý". in latin1 data i was used latin1_general_ci for correct result. but there is not alternative collation for utf8. its already utf8_general_ci. is there any other people have some problems or do you have a solution. thanks. i have tried stackoverflow search engine to for this problem. if its have mysql and utf8 then my work true. try search "alI" and "ali". both search give another result. but both same in turkish. the "I" is capital i and capital "I" is "i" in turkish.

    Read the article

  • iptables DNS resolution

    - by Favolas
    I have a virtual machine with Fedora 19 acting as a router. This machine as an interface (p8p1) with the IP 172.16.1.254 that is connected to another machine (IP 172.16.1.1) that's simulating the external network. I've installed snort 2.9.2.2, applied the snortsam-2.9.2.2.diff.gz patch and installed snortsam 2.70 on the routermachine In snort.conf besides altering some RULE_PATH I believe I've only added the following line to the file. output alert_fwsam: 127.0.0.1:898/password After doing this two comands: ifconfig p8p1 promisc /usr/local/snort/bin/snort -v -i p8p1 If I ping from the external network to the router IP, I can see the info about the pings. One of the rules that I have is icmp-info.rules that as this single line: alert icmp $EXTERNAL_NET any -> $HOME_NET any (msg:"ICMP-INFO Echo Reply"; icode:0; itype:0; classtype:misc-activity; sid:408; rev:6;fwsam: src, 5 minutes;) snortsam.conf as this data: defaultkey password accept localhost keyinterval 30 minutes dontblock 192.168.1.1 # rede local rollbackhosts 50 rollbackthreshold 20 / 30 secs rollbacksleeptime 1 minute logfile /var/log/snort/snortsam.log loglevel 3 daemon nothreads # linha importante para gerar os bloqueios via iptables iptables p8p1 LOG bindip 127.0.0.1 Now I run this command: /usr/local/snort/bin/snort -u snort -i p8p1 -c /etc/snort/snort.conf -l /var/log/snort -Dq Terminal gives this message: Spawning daemon child... My daemon child 2080 lives... Daemon parent exiting (0) and when I runsnortsam in terminal i got this: SnortSam, v 2.70. Copyright (c) 2001-2009 Frank Knobbe . All rights reserved. Plugin 'fwsam': v 2.5, by Frank Knobbe Plugin 'fwexec': v 2.7, by Frank Knobbe Plugin 'pix': v 2.9, by Frank Knobbe Plugin 'ciscoacl': v 2.12, by Ali Basel <[email protected]> Plugin 'cisconullroute': v 2.5, by Frank Knobbe Plugin 'cisconullroute2': v 2.2, by Wouter de Jong <[email protected]> Plugin 'netscreen': v 2.10, by Frank Knobbe Plugin 'ipchains': v 2.8, by Hector A. Paterno <[email protected]> Plugin 'iptables': v 2.9, by Fabrizio Tivano <[email protected]>, Luis Marichal <[email protected]> Plugin 'ebtables': v 2.4, by Bruno Scatolin <[email protected]> Plugin 'watchguard': v 2.7, by Thomas Maier <[email protected]> Plugin 'email': v 2.12, by Frank Knobbe Plugin 'email-blocks-only': v 2.12, by Frank Knobbe Plugin 'snmpinterfacedown': v 2.3, by Ali BASEL <[email protected]> Plugin 'forward': v 2.8, by Frank Knobbe Parsing config file /etc/snortsam.conf... Linking plugin 'iptables'... Checking for existing state file "/var/db/snortsam.state". Found. Reading state file. Starting to listen for Snort alerts. and snortsam.log as an entry like this 2013/10/25, 10:15:17, -, 1, snortsam, Starting to listen for Snort alerts. Now, from the external machine I do ping 172.16.1.254 and it starts showing the info and an alert file is created in /var/log/snort/ that as the info about the PINGS. Something like: [**] [1:408:6] ICMP-INFO Echo Reply [**] [Classification: Misc activity] [Priority: 3] 10/25-10:35:16.061319 172.16.1.254 -> 172.16.1.1 ICMP TTL:64 TOS:0x0 ID:38720 IpLen:20 DgmLen:84 Type:0 Code:0 ID:1389 Seq:1 ECHO REPLY Also, if I run instead /usr/local/snort/bin/snort snort -v -i p8p1 i got this message: Running in packet dump mode --== Initializing Snort ==-- Initializing Output Plugins! Snort BPF option: snort pcap DAQ configured to passive. The DAQ version does not support reload. Acquiring network traffic from "p8p1". ERROR: Can't set DAQ BPF filter to 'snort' (pcap_daq_set_filter: pcap_compile: syntax error)! Fatal Error, Quitting.. So, this are my questions: Shouldn't snortsam block the PING? Is that DAQ error causing the problem? If so, How can I solve it?

    Read the article

  • Ubuntu Server - Power failure leads to boot failure

    - by Ali Nadalizadeh
    I have installed Ubuntu Server 10.04.1 LTS on an ext4 partition. Whenever my system looses power suddenly, It doesn't boot into the normal procedure to fix the problems automatically, but switches to the busy box shell (where it says Kernel Panic : No init found) So I guess kernel is refusing to mount the filesystem when it is not clean, since when I boot up using a Live CD and fsck it, it boots up correctly. How can I force kernel to mount the filesystem, even if it is not clean ?, so that automated fsck on system startup fixes the problems... (or it's a grub problem ?) K-V : 2.6.32-26-generic-pae #48-Ubuntu SMP

    Read the article

  • Internet Sharing on Mac Behind Proxy

    - by Ali Kazmi
    Hi, I have enabled the internet sharing via Airport on Mac mini successfully. I can connect to the Wifi network from my iPhone but can't browse the internet. The problem might be that the Mac mini uses a proxy to connect to the internet. Is there a way to make this work?

    Read the article

  • Atheros LAN card driver, Linux compiling problem

    - by Ali Qocayev
    I have installed openSUSE 11.4 to my new workstation. It says that there is Attansic ETHERNET controller on board. But no devices seen. I typed: lspci and it returned: atheros communications device 1083. I have downloaded drivers. I'm trying to compile the driver. But I get the error: **Makefile:94: Linux kernel source not configured - missing autoconf.h. Stop** But I see autoconf.h presents on my system. What should I do ?

    Read the article

  • Server can't set IP after power outage

    - by Ali
    The power went out all of a sudden and when we tried to restart everything when it came back on - our server can't be assigned an IP? We got an error stating that the IP for the server was already in use by another system. We then shut down all systems and restarted the server but then for some reason the server was assigned an IP but no one could connect to it - after restarting the server after setting it to have a dynamically assigned ip - the server now has no ip - just 0.0.0.0 - running an ipconfig/renew or ipconfig /release has no effect.. what should we do!!

    Read the article

  • Is there a vmware appliance for software development?

    - by Ali Shafai
    I use Assembla.com and it does everything I need, SVN, bug tracking, ticketing... the only thing I don't like is that the server is not mine, I'm putting all my company property on a server in the coulds. I was wondering if there is an virtual machine to download and put on my server to serve all Assembla does?

    Read the article

  • How to interpret output from Linux 'top' command?

    - by Ali
    Following a discussion made HERE about how PHP-FPM consuming memory, I just found a problem in reading the memory in top command. Here is a screenshot of my top just after restarting PHP-FPM. Everything is normal: about 20 PHP-FPM processes, each consuming 5.5MB memory (0.3% of total). Here is the aged server right before restart of PHP-FPM (one day after the previous restart). Here, we still have about 25 PHP-FPM with double memory usage (10MB indicating 0.5% of total). Thus, the total memory used should be 600-700 MB. Then, why 1.6GB memory has been used?

    Read the article

  • Tried to join a workgroup but now can't loginto system

    - by Ali
    Help - I tried to join a workgroup but now all of a sudden I can't log into my system. I get an account not found error - also for some reason when I click the options button on the log in screen I can't see the domain option at all.. whats going on! I can't even log in using the adminstrator login or anything!!

    Read the article

  • Auto-detect proxy settings on network

    - by Ali Lown
    I am having problems trying to run web browser software on the local network through the proxy. When running off the profile drive which is on a network share, the system is unable to auto-detect proxy settings. When running off the local C drive, the browsers are able to correctly autodetect the settings. The error from the browser is about it being unable to fetch the proxy configuration file. Is this some form of authentication preventing it retreiving the settings when running of the network location? PS. Would this be better off on superuser?

    Read the article

  • Unable to resolve hostname on a proxy network

    - by ali
    I can browse sites using firefox configured with proxy 172.1.6.0.6:3128 resolv.conf domain pudhcp.ac.in search pudhcp.ac.in nameserver 172.16.0.7 I checked with Windows and I found the same DNS server settings 127.0.0.1 bt 127.0.1.1 bt Above is the hosts file I modified the top line from localhost to bt still not working bt is the hostname Still I can't ping to google.com - it is showing unable to resolv hostname I tried all solutions,I guess proxy is used even for DNS resolution root@bt:~# dhclient There is already a pid file /var/run/dhclient.pid with pid 7157 killed old client process, removed PID file Internet Systems Consortium DHCP Client V3.1.1 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Listening on LPF/eth1/5c:ac:4c:b1:0c:7c Sending on LPF/eth1/5c:ac:4c:b1:0c:7c Listening on LPF/eth0/60:eb:69:18:4d:3d Sending on LPF/eth0/60:eb:69:18:4d:3d Sending on Socket/fallback DHCPREQUEST of 172.16.6.87 on eth0 to 255.255.255.255 port 67 DHCPACK of 172.16.6.87 from 172.16.6.1 bound to 172.16.6.87 -- renewal in 79432 seconds.

    Read the article

  • I need access control within the same network/VLAN

    - by Sadiq ali
    Hi, I have a single network/VLAN and I want to block some traffic and allow some traffic in my network, is this possible using a L2 or L3 switch? If so which switches support this feature and what would be the commands to configure this? I have already tried this using access lists by applying it to an ethernet port but if I apply it on one port it will automatically work on incoming traffic on that port but I mean it to work on only outgoing traffic as per my ACL. Do you have any suggestions please?

    Read the article

  • (OS 10055) Queue full

    - by Ali
    I'm using apache with mysql on the other server, apache on windows 2003 with 4gb ram 3 dual core CPU My server keep on running smoothly without any issue for about 3 days or roundabout 60+ hours however between 60-70 hours my apache stop working & log events shows this error, I tried to search a lot but helpless, I have already increased max port, please if someone can help ? (OS 10055)An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. : make_sock: unable to listen for connections on address 0.0.0.0:80

    Read the article

  • How do I use Group Policy on a domain to delete Temporary Internet Files?

    - by Muhammad Ali
    I have a domain controller running on Windows 2008 Server R2 and users login to application servers on which Windows 2003 Server SP2 is installed. I have applied a Group Policy to clean temporary internet files on exit i.e to delete all temporary internet files when users close the browser. But the group policy doesn't seem to work as user profile size keeps on increasing and the major space is occupied by temporary internet files therefore increasing the disk usage. How can i enforce automatic deletion of temporary internet files?

    Read the article

  • Can not copy files from NTFS partition

    - by Ali
    I am experiencing a weird problem. I was running Xubuntu on my laptop until yesterday that I had to delete Xubuntu and install Windows. I had a NTFS partition on my Xubuntu that I kept some files on it. Today after installing windows I wanted to move all the files from that partition to an external HDD. I selected all files and folders and clicked on Copy, then I went to the HDD and clicked on paste but nothing happened. I can not do that. I do not know why. I copy the files, and wherever I click paste, nothing happens. If I try to copy the files and folders one by one, I can copy some of them, but some of them do not move. The other problem I have is that I can not open some files, in particular pdf files. When I click on pdf files I get this error: There was an error opening this document. This file cannot be found. Also, I cannot play some mp4 files. I can not open some jpg and txt files. I get this error The directory name is invalid. So in summary, after removing Xubuntu and installing windows 7 I have the following problems with one of the NTFS partitions on my internal drive: Can not copy or cut all folders and files from that partition to any other partition - I also do not get any errors. Can copy some folders and files Can not access some pdf, jpeg, txt and mp4 files and get the above errors. I should also mention I did not change anything for this partition during the installation or formatting the other partitions.

    Read the article

  • Connect to internet through DC with 2 network interfaces

    - by Ali Foroughi
    I have a network like this : Client 1 <== Wireless ==> Access Point <== Wire ==> DC <== Wireless ==> ADSL Modem Client 1 : IP : 192.168.1.181 DG : 192.168.1.100 DNS : 192.168.1.100 Access Point : IP : 192.168.1.10 DG : 192.168.1.100 DC : IP : 192.168.1.100 DG : 192.168.1.1 DNS : 127.0.0.1 ADSL Modem : IP : 192.168.1.1 I can ping yahoo.com from client1, but cannot browse the internet. UPDATE1 : my DC has two network interfaces that I bridge together. UPDATE2 : I powered down the DC firewall UPDATE3 : I set a forwarder for my DC to 8.8.8.8 (Google dns)

    Read the article

  • Mac OS X web server memory depletion issues

    - by Ali
    I have a Mac mini ram 4GB setup as a web server which has low traffic - it is running single WordPress instance and a forum. Why is available memory dropping to ~20MB after a while, bringing the whole server down? I see httpd processes climbing more and more, and the only thing I can do is to restart the server and everything will work fine again. Anybody with the same issues to share their thought about this?

    Read the article

  • Installing PHP Imagick with libmagickcore4

    - by Ali
    I have ImageMagick (version 6.6.9-7) on Ubuntu 12.04, which has libmagickcore4. When I tried to install PHP imagick, I received the following error: The following packages have unmet dependencies: php5-imagick : Depends: libmagickcore3 (>= 8:6.6.0.4) but it is not installable Depends: libmagickwand3 (>= 8:6.6.0.4) but it is not installable E: Unable to correct problems, you have held broken packages. Apparently, the problem is that php5-imagick is based on libmagickcore3 but a newer verion has been installed on my Ubuntu. Is there a way to instruct PHP imagick to use libmagickcore4?

    Read the article

  • How to disable Apache http compression (mod_deflate) when SSL stream is compressed

    - by Mohammad Ali
    I found that Goggle Chrome supports ssl compression and Firefox should support it soon. I'm trying to configure Apache to to disable http compression if the ssl compression is used to prevent CPU overhead with the configuration option: SetEnvIf SSL_COMPRESS_METHOD DEFLATE no-gzip While the custom log (using %{SSL_COMPRESS_METHOD}x) shows that the ssl layer compression method is DEFLATE, the above option did not work and the http response content is still being compressed by Apache. I had to use the option: BrowserMatchNoCase ".Chrome." no-gzip' I prefer if there are more general method in case other browsers supports ssl compression or some has a version of chrome that does not have ssl compression.

    Read the article

  • Redirect subdomain to subdomain on new domain

    - by Ali
    Hello, I own 2 domains sio-india.org and sio-india.com What i want to do is redirect all the subdomains from 1st domain to 2nd domain. eg. home.sio-india.org to home.sio-india.com but i dont want to redirect sio-india.org to sio-india.com and also dont want to redirect www.sio-india.org to www.sio-india.com Please help I am using this code in htaccess but it is not working. RewriteCond %{HTTP_HOST} ^(.*)sio-india\.org$ [NC] RewriteRule ^(.*)$ http://%1sio-india.com/$1 [R=301,L] Please hepl me I am stuck.

    Read the article

  • Can any body help me for this.. please..

    - by Abid Ali
    When do i run the set up of Adobe Reader, i get this error that this installer package could not be opened. verify that the package exist and that you can access it, or contact the application vendor to verify that this is a valid windows installer package... please help me Regards Abid

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >