Daily Archives

Articles indexed Wednesday October 17 2012

Page 7/17 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Prioritize compiler functionality/tasks, when designing a new language

    - by Mahdi
    Well, the question should be so hard to ask and I expect couple of down votes, however, I'm really interested to have your ideas and recommendations. :) I've already made a very simple compiler, with a few and limited functionality. Now I'm getting more on it to make it more like a real-world compiler. I definitely need to start over 'cause I've much more experience and ideas in this area rather a few years ago. So, I want to know, right now, from the very first step again, which tasks/features for the new compiler should implement first and which tasks has lower priority rather than others? For example, I'd say, first I'd go to decide about the object-oriented structure for the new language, but you might say, hey, just go for a compiler that could define a variable, when you finished that, then start thinking about OOP designs ... I prefer to hear the pros and cons for your suggestions also. Actually I like to start from Bottom to Top, where I could add simplest tasks first, and later adding more complex ones, but I'm totally open for any new ideas, and really appreciate that. Also please consider that I'm thinking about the design concepts. Actually I expect answers like: Priority from Highest to Lowest: variables, because .... functions, because .... loops, because .... ... Not: define a syntax for your new language, and start parsing your source code ...

    Read the article

  • Map Library: Client-side or Server-side?

    - by Mahdi
    As I have already asked here, I have to implement a Multi-Platform Map application. Now I have Mapstraction as an option which uses Javascript to implement the desired functionality. My question is, "Is there any reason/benefit to implement such a library (let say, Adapters) in Server-side (in my case, PHP)?" As these maps are all based on Javascript, there is a big reason to use Javascript again to make the adapter also, so it would not be dependent to PHP, Java, or .NET for example. But is that all? I wish to hear your ideas and comments also. :)

    Read the article

  • Video Recording Not Working in ICS

    - by Nirav Ranpara
    I have implement code Record video in Android Phone . This code is working in 2.2 , 2.3 . not in ICS But when I checked in ICS code is not working ? here I posted code and xml file. videorecord.java import java.io.File; import java.io.IOException; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.hardware.Camera; import android.media.CamcorderProfile; import android.media.MediaRecorder; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Environment; import android.util.Log; import android.view.Display; import android.view.KeyEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget.EditText; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; public class videorecord extends Activity{ SharedPreferences.Editor pre; String filename; CountDownTimer t; private Camera myCamera; private MyCameraSurfaceView myCameraSurfaceView; private MediaRecorder mediaRecorder; Integer cnt=0; LinearLayout myButton; TextView myButton1; SurfaceHolder surfaceHolder; boolean recording; private TextView txtcount; private ImageView btnplay; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); recording = false; setContentView(R.layout.videorecord); init(); myCamera = getCameraInstance(); if(myCamera == null){ } myCameraSurfaceView = new MyCameraSurfaceView(this, myCamera); FrameLayout myCameraPreview = (FrameLayout)findViewById(R.id.videoview); Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); myCameraSurfaceView.setLayoutParams(new LinearLayout.LayoutParams(width, height-60)); myCameraPreview.addView(myCameraSurfaceView); myButton = (LinearLayout)findViewById(R.id.mybutton); btnplay.setOnClickListener(myButtonOnClickListener); } private void init() { txtcount = (TextView) findViewById(R.id.txtcounter); //myButton1 = (TextView) findViewById(R.id.mybutton1); btnplay = (ImageView)findViewById(R.id.btnplay); t = new CountDownTimer( Long.MAX_VALUE , 1000) { @Override public void onTick(long millisUntilFinished) { cnt++; String time = new Integer(cnt).toString(); long millis = cnt; int seconds = (int) (millis / 60); int minutes = seconds / 60; seconds = seconds % 60; txtcount.setText(String.format("%d:%02d:%02d", minutes, seconds,millis)); } @Override public void onFinish() { } }; } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { if(recording) { new AlertDialog.Builder(videorecord.this).setTitle("Do you want to save Video ?") .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { filename(); //finish(); } }).setNegativeButton("Cancle", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub } }).show(); } else { if ((keyCode == KeyEvent.KEYCODE_BACK)) { //Intent homeIntent= new Intent(Intent.ACTION_MAIN); //homeIntent.addCategory(Intent.CATEGORY_HOME); //homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); //startActivity(homeIntent); //this.finishActivity(1); finish(); } //moveTaskToBack(true); // finish(); return super.onKeyDown(keyCode, event); } } else { // Toast.makeText(getApplicationContext(), "asd", Toast.LENGTH_LONG).show(); android.os.Process.killProcess(android.os.Process.myPid()) ; } return super.onKeyDown(keyCode, event); } ImageView.OnClickListener myButtonOnClickListener = new ImageView.OnClickListener(){ public void onClick(View v) { if(recording){ Log.e("Record error", "error in recording ."); mediaRecorder.stop(); t.cancel(); filename(); releaseMediaRecorder(); }else{ releaseCamera(); Log.e("Record Stop error", "error in recording ."); // if(!prepareMediaRecorder()){ prepareMediaRecorder(); finish(); } mediaRecorder.start(); recording = true; // myButton1.setText("STOP Recording"); // btnplay.setImageResource(android.R.drawable.ic_media_pause); btnplay.setImageResource(R.drawable.stoprec); t.start(); } }}; private Camera getCameraInstance(){ Camera c = null; try { c = Camera.open(); } catch (Exception e){ } return c; } private void filename() { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle("Save Video"); alert.setMessage("Enter File Name"); final EditText input = new EditText(this); alert.setView(input); alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { if(input.getText().length()>=1) { filename = input.getText().toString(); File sdcard = new File(Environment.getExternalStorageDirectory() + "/VideoRecord"); File from = new File(sdcard,"null.mp4"); File to = new File(sdcard,filename+".mp4"); from.renameTo(to); SharedPreferences sp = videorecord.this.getSharedPreferences("data", MODE_WORLD_WRITEABLE); pre = sp.edit(); pre.clear(); pre.commit(); pre.putString("lastvideo", filename+".mp4"); pre.commit(); //btnplay.setImageResource(android.R.drawable.ic_media_play); btnplay.setImageResource(R.drawable.startrec); // Intent intent = new Intent(videorecord.this,StopVidoWatch_Activity.class); // startActivity(intent); Intent myIntent = new Intent(getApplicationContext(), StopVidoWatch_Activity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(myIntent); } else { filename(); } } }); alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { // Intent intent = new Intent(videorecord.this,StopVidoWatch_Activity.class); // startActivity(intent); File file = new File(Environment.getExternalStorageDirectory() + "/VideoRecord/null.mp4"); //boolean deleted = file.delete(); file.delete(); finish(); } }); alert.show(); } private boolean prepareMediaRecorder(){ myCamera = getCameraInstance(); mediaRecorder = new MediaRecorder(); myCamera.unlock(); mediaRecorder.setCamera(myCamera); mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER); mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH)); File folder = new File(Environment.getExternalStorageDirectory() + "/VideoRecord"); boolean success = false; if (!folder.exists()) { success = folder.mkdir(); } if (!success) { } else { } mediaRecorder.setOutputFile("/sdcard/VideoRecord/"+filename+".mp4"); mediaRecorder.setMaxDuration(60000); mediaRecorder.setMaxFileSize(5000000); Display display = getWindowManager().getDefaultDisplay(); int width = display.getHeight(); int height = display.getWidth(); String s = new String(); s= s.valueOf(width); String s1 = new String(); s1= s1.valueOf(height); // Toast.makeText(videorecord.this, "Width : " + s , Toast.LENGTH_LONG).show(); // Toast.makeText(videorecord.this, "Height : " + s1 , Toast.LENGTH_LONG).show(); mediaRecorder.setVideoSize(height, width); mediaRecorder.setPreviewDisplay(myCameraSurfaceView.getHolder().getSurface()); try { mediaRecorder.prepare(); } catch (IllegalStateException e) { releaseMediaRecorder(); return false; } catch (IOException e) { releaseMediaRecorder(); return false; } return true; } @Override protected void onPause() { super.onPause(); releaseMediaRecorder(); releaseCamera(); } private void releaseMediaRecorder() { if (mediaRecorder != null) { mediaRecorder.reset(); mediaRecorder.release(); mediaRecorder = null; myCamera.lock(); } } private void releaseCamera(){ if (myCamera != null){ myCamera.release(); myCamera = null; } } public class MyCameraSurfaceView extends SurfaceView implements SurfaceHolder.Callback{ private SurfaceHolder mHolder; private Camera mCamera; public MyCameraSurfaceView(Context context, Camera camera) { super(context); mCamera = camera; mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public void surfaceChanged(SurfaceHolder holder, int format, int weight, int height) { if (mHolder.getSurface() == null){ return; } try { mCamera.stopPreview(); } catch (Exception e){ } try { mCamera.setPreviewDisplay(mHolder); mCamera.startPreview(); } catch (Exception e){ } } public void surfaceCreated(SurfaceHolder holder) { try { mCamera.setPreviewDisplay(holder); mCamera.startPreview(); } catch (IOException e) { } } public void surfaceDestroyed(SurfaceHolder holder) { } } } videorecord.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" > <FrameLayout android:id="@+id/videoview" android:layout_width="fill_parent" android:layout_height="fill_parent"></FrameLayout> <LinearLayout android:id="@+id/mybutton" android:layout_width="fill_parent" android:layout_marginBottom="0dip" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_weight="0" > <!-- <TextView android:text="START Recording" android:id="@+id/mybutton1" android:layout_height="wrap_content" android:layout_width="wrap_content" style="@style/savestyle" android:layout_weight="1" android:gravity="left" > </TextView> --> <ImageView android:layout_height="wrap_content" android:id="@+id/btnplay" android:padding="5dip" android:background="#A0000000" android:textColor="#ffffffff" android:layout_width="wrap_content" android:src="@drawable/startrec" /> </LinearLayout> <TextView android:text="00:00:00" android:id="@+id/txtcounter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|bottom" android:padding="5dip" android:background="#A0000000" android:textColor="#ffffffff" /> </FrameLayout> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/bgcolor" > <LinearLayout android:layout_above="@+id/mybutton" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" > </LinearLayout> </RelativeLayout> </LinearLayout>

    Read the article

  • good literature for teaching object oriented thinking in C [closed]

    - by Dipan Mehta
    Quite often C is the primary platform for the development. And when things are large scale, I have seen partitioning of the system as different objects is quite a natural thing. Some or many of the object orientated analysis and design principles are used here very well. This is not a debate question about whether or not C is a good candidate for object oriented programming or not. This is also NOT a question how to do OO in C. You can refer to this question and there are probably many such citations. As far as I am concerned, I have learned some of this things while working with many open source and commercial projects. (libjpeg, ffmpeg, Gstreamer which is based on GObject). I can probably extend a few references that explains some of these concepts such as - 1. Event Helix article, 2. Linux Mag article 3. one of my answers which links Schreiner's reference. Unfortunately, when we induct younger folks, it seems too hard to make them learn all of it the hard way. Usually, when we say it's C, a general reaction is to throw away all of the "Object thinking". Looking for help extending above references from those who have been in the similar areas of work. Are there any good formal literature that explains how Object thinking can be made to use while you are working in C? I have seen tons of book on general "object oriented paradigms" but they all focus on advanced languages mostly not in C. You see most C books - but most focus only on the syntax and the obfuscated corners of C and that's it. There are hardly ANY good reference, specially books or any systematic (I mean formal) literature on how to apply OO in C. This is very surprising given that so many large scale open source projects use C which are truly using this very well; but we hardly see any good formal literature on this subject.

    Read the article

  • Dynamically load and call delegates based on source data

    - by makerofthings7
    Assume I have a stream of records that need to have some computation. Records will have a combination of these functions run Sum, Aggregate, Sum over the last 90 seconds, or ignore. A data record looks like this: Date;Data;ID Question Assuming that ID is an int of some kind, and that int corresponds to a matrix of some delegates to run, how should I use C# to dynamically build that launch map? I'm sure this idea exists... it is used in Windows Forms which has many delegates/events, most of which will never actually be invoked in a real application. The sample below includes a few delegates I want to run (sum, count, and print) but I don't know how to make the quantity of delegates fire based on the source data. (say print the evens, and sum the odds in this sample) using System; using System.Threading; using System.Collections.Generic; internal static class TestThreadpool { delegate int TestDelegate(int parameter); private static void Main() { try { // this approach works is void is returned. //ThreadPool.QueueUserWorkItem(new WaitCallback(PrintOut), "Hello"); int c = 0; int w = 0; ThreadPool.GetMaxThreads(out w, out c); bool rrr =ThreadPool.SetMinThreads(w, c); Console.WriteLine(rrr); // perhaps the above needs time to set up6 Thread.Sleep(1000); DateTime ttt = DateTime.UtcNow; TestDelegate d = new TestDelegate(PrintOut); List<IAsyncResult> arDict = new List<IAsyncResult>(); int count = 1000000; for (int i = 0; i < count; i++) { IAsyncResult ar = d.BeginInvoke(i, new AsyncCallback(Callback), d); arDict.Add(ar); } for (int i = 0; i < count; i++) { int result = d.EndInvoke(arDict[i]); } // Give the callback time to execute - otherwise the app // may terminate before it is called //Thread.Sleep(1000); var res = DateTime.UtcNow - ttt; Console.WriteLine("Main program done----- Total time --> " + res.TotalMilliseconds); } catch (Exception e) { Console.WriteLine(e); } Console.ReadKey(true); } static int PrintOut(int parameter) { // Console.WriteLine(Thread.CurrentThread.ManagedThreadId + " Delegate PRINTOUT waited and printed this:"+parameter); var tmp = parameter * parameter; return tmp; } static int Sum(int parameter) { Thread.Sleep(5000); // Pretend to do some math... maybe save a summary to disk on a separate thread return parameter; } static int Count(int parameter) { Thread.Sleep(5000); // Pretend to do some math... maybe save a summary to disk on a separate thread return parameter; } static void Callback(IAsyncResult ar) { TestDelegate d = (TestDelegate)ar.AsyncState; //Console.WriteLine("Callback is delayed and returned") ;//d.EndInvoke(ar)); } }

    Read the article

  • Connect to a VPN from a Virtual Machine

    - by kaharas
    I am running an Ubuntu ditro inside a VMWare virtual machine with a bridged connection on a windows 7 host. What I am trying to do is to have the virtual machine connect to a VPN, but I'm not having much success. At first, the system was using wicd, but I replaced it with network-manager who's supposed to have OpenVPN support. The problem is, even tho i've purged the wicd installation, there're connections shown in the network manager, and still, I'm able to access the net. I've also added the openvpn data in the network manager tab, but it's shown as never used. PS: when I try to stop and start the NetworkManager service, an error message pops up telling me that there's not such a service, but apt-get tells me i've already installed it...

    Read the article

  • Keep getting smbd errors, but apport asks questions I can't answer

    - by Steve Kroon
    What I want to know below is where to bug report the poor series of questions I'm being asked... Every time I reboot (at least), I get a crash dialog ("Sorry, Ubuntu 12.04 has experienced an internal error"). Clicking on show details shows the problem is with smbd, but the rest of the trace does not appear. When I wish to continue to send a bug report, I am told I will be asked a series of questions in a window titled "Apport". The first question asks: How would you best describe your setup? -I am running a Windows File Server -I am connecting to a Windows File Server. Since I am doing both, I have no idea which to choose. In any case, selecting one leads to the next question: Did this used to work properly with a previous release? -No -Yes But I never tried to use Samba in a previous release, so I can't seriously answer this. After picking an option here, I get more questions in a similar vein. Surely there should be "I don't know/I haven't tried" options, even if they simply mean you can't submit a useful bug report.

    Read the article

  • Unable to configure a service to run at startup with update-rc.d

    - by ujjain
    I would like to have transmission-daemon and vnstat automatically run at startup. I was able to configure this for apache2 and proftpd with exactly the same commands. 795 sudo update-rc.d transmission-daemon remove 797 sudo update-rc.d -f transmission-daemon remove 798 sudo update-rc.d transmission-daemon defaults 799 sudo update-rc.d vnstat remove 800 sudo update-rc.d -f vnstat remove 801 sudo update-rc.d -f vnstat defaults 802 sudo update-rc.d -f vnstat enable 805 reboot 807 history root@htpc:/home/administrator# sudo update-rc.d -f transmission-daemon remove Removing any system startup links for /etc/init.d/transmission-daemon ... /etc/rc0.d/K20transmission-daemon /etc/rc1.d/K20transmission-daemon /etc/rc2.d/S20transmission-daemon /etc/rc3.d/S20transmission-daemon /etc/rc4.d/S20transmission-daemon /etc/rc5.d/S20transmission-daemon /etc/rc6.d/K20transmission-daemon root@htpc:/home/administrator# sudo update-rc.d -f transmission-daemon defaults Adding system startup for /etc/init.d/transmission-daemon ... /etc/rc0.d/K20transmission-daemon -> ../init.d/transmission-daemon /etc/rc1.d/K20transmission-daemon -> ../init.d/transmission-daemon /etc/rc6.d/K20transmission-daemon -> ../init.d/transmission-daemon /etc/rc2.d/S20transmission-daemon -> ../init.d/transmission-daemon /etc/rc3.d/S20transmission-daemon -> ../init.d/transmission-daemon /etc/rc4.d/S20transmission-daemon -> ../init.d/transmission-daemon /etc/rc5.d/S20transmission-daemon -> ../init.d/transmission-daemon root@htpc:/home/administrator# service vnstat status * vnStat daemon is not running root@htpc:/home/administrator# service transmission-daemon status * transmission-daemon is not running root@htpc:/home/administrator# service transmission-daemon start * Starting bittorrent daemon transmission-daemon [ OK ] root@htpc:/home/administrator# service vnstat start * Starting vnStat daemon vnstatd [ OK ] root@htpc:/home/administrator# service apache2 status Apache2 is running (pid 1137). root@htpc:/home/administrator#

    Read the article

  • Getting Black screen after installing 12.04 on new Mac Pro

    - by Matteo
    I installed Ubuntu 12.04 on my new Mac Pro. I had some problems because bootcamp did not allow me to partition the hd without a Windows cd. I inserted a Windows cd and did the partition and then I stopped the installation. I completed the installation of Ubuntu that now works. The problem is that Grub can't start Mac OS. It sees the Mac OS X in the menu but if I try to start it I have a black screen or sometime just the boot manager. Has anyone else experienced this problem?

    Read the article

  • Software Center doesn't open (elementary luna - ubuntu 12.04)

    - by zbiba
    When i try to open software center on elementary luna i get the bellow error.... ERROR:root:DebFileApplication import Traceback (most recent call last): File "/usr/share/software-center/softwarecenter/db/init.py", line 4, in from debfile import DebFileApplication, DebFileOpenError File "/usr/share/software-center/softwarecenter/db/debfile.py", line 25, in from softwarecenter.db.application import Application, AppDetails File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in import softwarecenter.distro File "/usr/share/software-center/softwarecenter/distro/init.py", line 198, in distro_instance = _get_distro() File "/usr/share/software-center/softwarecenter/distro/init.py", line 175, in _get_distro distro_class = getattr(module, distro_id) AttributeError: 'module' object has no attribute 'debian' Traceback (most recent call last): File "/usr/sbin/update-software-center", line 38, in from softwarecenter.db.update import rebuild_database File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in from softwarecenter.distro import get_distro File "/usr/share/software-center/softwarecenter/distro/init.py", line 198, in distro_instance = _get_distro() File "/usr/share/software-center/softwarecenter/distro/init.py", line 175, in _get_distro distro_class = getattr(module, distro_id) AttributeError: 'module' object has no attribute 'debian'

    Read the article

  • Three Ubuntu 12.04 + Xfce problems

    - by user1708495
    sorry to bother you, but I wanted to set up a minimal Ubuntu 12.04 with minimal Xfce and probably due to my unawareness of several important things, not everything is working properly. -Sometimes when I shutdown I get error message from iwlwifi: It starts with a time out error about sending a power table and after several other errors it says "On demand firmware reload and "Unable to initialize device". And the shutdown stops there so I can only use hard shutdown. -Also when I boot, I often boot to a black screen, but pressing ctrl+alt+f1 gets me to the login prompt (I do not use a login manager). But then I sometimes cannot type. Seems probably more like a X server problem. When it works I only see the Plymouth splash for a very short time or sometimes not at all. -And the last problem is the most annoying one: Frequently Xfce freezes completely. I think ctrl+alt+f1 works sometimes, but other times I also have to use hard shutdown. When it freezes the cpu fan gets louder. I've been using Xbuntu for a while before, but with "real" Linux I am more a beginner, so I hope you forgive my questions Thanks

    Read the article

  • Nautilus could not create the following required folders

    - by babak
    I have changed my username and when I did this,I can not log in with my new user and this error comes in the screen: nautilus could not create the following required folders: /home/"last username"/desktop and /home/'last username'/.nautilus .Also when I press CTRL+ALT+F6 for the command line I can not login with my new username. Although I have still access to Linux by root. My Ubuntu version is 11.04 .

    Read the article

  • xrdp setup over ssh

    - by Xianlin
    Here are the steps to install xrdp on ubuntu 12.04 and get it working: http://www.ubuntututorials.com/remote-desktop-ubuntu-12-04-windows-7/ However, I want a secure xrdp connection over ssh and I am able to achieve it by using port forwarding in the software putty as below: L1234 == localhost:3389 But I am still able to remote login to the ubuntu through xrdp connection when I am not connected using SSH. It is supposed to deny remote login when SSH is not present. In the file /etc/xrdp/xrdp.ini I tried to change the [global] section by adding "ip=127.0.0.1" and it didn't work.

    Read the article

  • Mirror using apt-mirror and exclud certain sections/categories

    - by Onitlikesonic
    I'm currently using apt-mirror to create a local mirror of the debian repositories. As the mirrored repositories will be used only by machines destined to be headless servers and as an effort to reduce the current mirroring size (around 75GB), categories like games and possibly others will never be needed. How can I go about specifying (on the mirror.list perhaps?) what sections/categories I want to be excluded from the mirroring? Maybe a bit subjective, but apart from games what other sections/categories could be "safely" ignored from the mirroring for my environment purposes? My mirror.list looks as below since all the machines are using precise. # MAIN deb-amd64 http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse # SECURITY deb-amd64 http://archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse Also, what others would you recommend adding to the list to be mirrored for a relatively stable environment? Again I understand this is subjective, just looking for some pointers. Much appreciated in advance

    Read the article

  • Bizarre SSH Problem - It won't even start

    - by thallium85
    I recently got Ubuntu 12.04 Precise, got it up and running with some MediaWiki software, static IP on the box and router and was able to access the main page even from a cell phone. Everything seemed great... Then I wanted to finally get rid of the monitor and keyboard and login remotely via SSH. I installed openssh-server, let everything point to port 22 for a test run and installed putty on my Windows XP machine. I got a connection refused. Went back and started checking the Ubuntu install itself... (I'm under root from this point on) $ sudo -s $ service ssh status ssh stop/waiting $ service ssh start ssh start/running, process 2212 $ service ssh status ssh stop/waiting Apparently ssh has stopped or is waiting for something.... $ ssh localhost ssh: connect to host localhost port 22: Connection refused I can't even connect to myself... I checked ufw (firewall) to see if port 22 is doing alright... $ sudo ufw status Status: active To Action From 22 ALLOW Anywhere 22/tcp ALLOW Anywhere 22 ALLOW Anywhere (v6) 22/tcp ALLOW Anywhere (v6) sshd_config shows only Port 22 Is ssh not using the right IP address at all? I just don't get what I did wrong here. When this is up and running I will def change the port number, but for now, I don't want to mess with the default install too much until a test run with putty is successful. Edit: Here are my sshd_config file and my ssh_config file. The command /usr/sbin/sshd -p 22 -D -d -e returns: /etc/ssh/sshd_config line 159: Subsystem 'sftp' already defined. Edit: @phoibus moving the sshd_config file and reinstalling did the trick! service ssh status the above command shows that ssh is now running and I am now able to log in from my windows xp computer remotely via putty. Thanks so much! I can now use my monitor for other things!

    Read the article

  • No input method choice appear on iBus

    - by phanect
    I've installed iBus and ibus-mozc, and an input method engine of Japanese from the repository, and attempted to enable mozc from Preference > "Input Method" tab > "Select Input Method" combo box. However, there is no choice to select, so I couldn't enable mozc. I also tried ibus-anthy, another legacy Japanese input method, but the situation was the same and I couldn't use anthy. Same problem is also occuring in openSUSE 12.1, so I don't think this is distribution-specific problem. In addition, this trouble also happened when I installed ibus-pynin, so this is not Japanese-specific. Any idea to find the cause of this trouble?

    Read the article

  • How do I get wireless to work on a Dell Mini 1018 with Realtek RTL 8188CE Network Adapter?

    - by Laurence Nagel
    My Dell Mini 1018 used to work fine with Ubuntu 12.04 with no problems connecting with the wireless card. Then I made the big mistake of attempting to disable WiFi by right-clicking on the wireless applet and un-checking "Enable Wireless." Since then, I cannot get wireless working again. The wireless applet reports that "wireless is disabled by hardware switch" but there is no hardware switch on this computer. Issuing a rfkill list yields the following: 0: dell-wifi: Wireless LAN Soft blocked: yes Hard block: yes 1: phy0: Wireless LAN Soft blocked: no Hard blocked: yes I'm in way over my head, and my computer is now useless. Help!!!

    Read the article

  • HP Deskjet 720C USB printer doesn't finish

    - by 213441265152351
    I have an HP Deskjet 720C connected through a USB cable to an Ubuntu 12.04 laptop. When I plugged the printer for the first time into the fresh 12.04 laptop install, it auto-detected the printer correctly and choose the recommended drivers without a problem. The document print fine until they reach the end of the last page, then suddenly stop just about the end leaving the page unfinished. I have checked that the margins are the correct ones. I have the latest version of cups installed. I have also tried changing the options of usb-unidir-default and usb-no-reattach-default via lpadmin, but the printing stops even earlier. EDIT: It seems like the problem is with the last page. So if I am printing 3 pages, the first two work well but the last few lines in the last page are not printed. Any ideas?

    Read the article

  • How can I instruct nautilus to pre-generate PDF thumbnails?

    - by Glutanimate
    I have a large library of PDF documents (papers, lectures, handouts) that I want to be able to quickly navigate through. For that I need thumbnails. At the same time however, I see that the ~/.thumbnails folder is piling up with thumbs I don't really need. Deleting thumbnail junk without removing the important thumbs is impossible. If I were to delete them, I'd have to go to each and every folder with important PDF documents and let the thumbnail cache regenerate. I would love to able to automate this process. Is there any way I can tell nautilus to pre-cache the thumbs for a set of given directories? Note: I did find a set of bash scripts that appear to do this for pictures and videos, but not for any other documents. Maybe someone more experienced with scripting might be able to adjust these for PDF documents or at least point me in the right direction on what I'd have to modify for this to work with PDF documents as well. Edit: Unfortunately neither of the answers provided below work. See my comments below for more information. Is there anyone who can solve this?

    Read the article

  • File / Application association using a custom command is gone?

    - by Christian Vielma
    In previous Ubuntus when you want to select/change an application to open a specific file (right-click/open with other application or properties) you were able to write a custom command to open the file. This was very useful, but now in 11.10 I can't find this option, it only shows me a list of applications and a button to look for applications in Internet. Is there a way to restore the command line to write custom commands to open files?

    Read the article

  • building a sms web application [closed]

    - by ramesh babu
    Possible Duplicate: How to add SMS text messaging functionality to my website? I would like to build a web application the purpose of the web site is to send and receive sms. I was researched so much but I didn't understood what are the requirements. simply i want he application similar to way2sms.com. and I dont want to buy sms from a company. I would like to build my own infrastructure. I have web designing stuff. I would like to know what are the requirements to send recieve sms and what is the infrastructure do i need to do it.

    Read the article

  • Assign subdomains to separate ports on web server

    - by Michael Frank
    I have set up an Abyss web server as a little experiment, and I want to know if it is possible to assign subdomains to different ports on the machine the web server is running on. I have a couple webUIs that I'd like to assign subdomains: 192.168.1.1:8000 becomes example.com/webui1/ 192.168.1.1:8001 becomes example.com/webui2/ The webUIs are available by accessing their ports via example.com:8000. I have tried using a reverse proxy, but it seems that this is only usable on one internal IP at a time. What other options do I have? Answer is good, but my current set up doesn't meet the requirements. Abyss Web Server X2 is required to use Virtual Hosts with Abyss.

    Read the article

  • How would I tell if a prospective client website is under DDoS attack?

    - by artlung
    I have a person asking me whether the DDoS Mitigation Service they're using is worth it. This is out of my expertise, but clearly at some point someone sold this service to the client. Assuming I don't have anything but a domain name, what information can I gather about whether they are indeed under attack and/or how well the DDoS Mitigation Service is working? Assume I don't have any administrative access to the site/server(s) in question.

    Read the article

  • Unity3d: calculate the result of a transform without modifying transform object itself

    - by Heisenbug
    I'm in the following situation: I need to move an object in some way, basically rotating it around its parent local position, or translating it in its parent local space (I know how to do this). The amount of rotation and translation is know at runtime (it depends on several factors, the speed of the object, enviroment factors, etc..). The problem is the following: I can perform this transformation only if the result position of the transformed object fit some criterias. An example could be this: the distance between the position before and after the transformation must be less than a given threshold. (Actually the conditions could be several and more complex) The problem is that if I use Transform.Rotate and Transform.Translate methods of my GameObject, I will loose the original Transform values. I think I can't copy the original Transform using instantiate for performance issues. How can I perform such a task? I think I have more or less 2 possibilities: First Don't modify the GameObject position through Transform. Calculate which will be the position after the transform. If the position is legal, modify transform through Translate and Rotate methods Second Store the original transform someway. Transform the object using Translate and Rotate. If the transformed position is illegal, restore the original one.

    Read the article

  • Arbitrary Rotation about a Sphere

    - by Der
    I'm coding a mechanic which allows a user to move around the surface of a sphere. The position on the sphere is currently stored as theta and phi, where theta is the angle between the z-axis and the xz projection of the current position (i.e. rotation about the y axis), and phi is the angle from the y-axis to the position. I explained that poorly, but it is essentially theta = yaw, phi = pitch Vector3 position = new Vector3(0,0,1); position.X = (float)Math.Sin(phi) * (float)Math.Sin(theta); position.Y = (float)Math.Sin(phi) * (float)Math.Cos(theta); position.Z = (float)Math.Cos(phi); position *= r; I believe this is accurate, however I could be wrong. I need to be able to move in an arbitrary pseudo two dimensional direction around the surface of a sphere at the origin of world space with radius r. For example, holding W should move around the sphere in an upwards direction relative to the orientation of the player. I believe I should be using a Quaternion to represent the position/orientation on the sphere, but I can't think of the correct way of doing it. Spherical geometry is not my strong suit. Essentially, I need to fill the following block: public void Move(Direction dir) { switch (dir) { case Direction.Left: // update quaternion to rotate left break; case Direction.Right: // update quaternion to rotate right break; case Direction.Up: // update quaternion to rotate upward break; case Direction.Down: // update quaternion to rotate downward break; } }

    Read the article

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