I am having trouble putting this code together. My main code is a state machine. It adds 2 numbers together = sum then loads A to add A to sum (sum=a+sum) after clock is reached. It then divides by n bit. I'm having Lots of trouble assigning outputs. What is legal and what is not am I able to set the regs equal to each other sometimes I feel like I can do that and some other times I cannot. If I use the module, can the input be an output and vice versa? I posted my whole code because I wanted to get it to work. I think my device is correct, but I need to create a testbench to test it. module A
I need to open rtsp stream. I have the following code for Firefox and Chrome: <embed width="300" height="300" wmode="transparent" id="vlc_1" pluginspage="http://www.videolan.org" type="application/x-vlc-plugin" autoplay="true" src="rtsp://USER:PASSWORD@MY_IP:MY_PORT/PSIA/streaming/channels/CAM"> As so far I tried to wrap embed with object without significant result. Anyway code is: <object width="300" height="300" data="rtsp://USER:PASSWORD@IP:PORT/PSIA/streaming/channels/CAM_NUMBER" events="True" id="vlc_1" codebase="http://localhost:65211/axvlc.cab" classid="clsid:4AD27CDD-8C2B-455E-8E2A-463
Goto was unexpected at this time in a batch file - summary = pre-parsing of batch file led to error when a variable was undefined. Eliminating preparsing allowed the program to work as anticipated.
I am trying to create an Infopath form to submit and change data in a Sharepoint Server List. If I have the form submit to a Sharepoint Server Form Library, it works perfectly fine. I followed the step-by-step instructions to submit a form to a list at the following: http://blogs.msdn.com/b/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx That guide's results is exactly what I would need. The list comes out great in the Infopath form, however, when I try to test it and submit the form, I get an error. If I preview and try to fill out the form from within Infopath (after publish
The grid columns may be resizable. I want to store user-adjusted columns width and restore them when the next session starts. The best way to store columns width I've found is the following: var element = $('#grid').kendoGrid({ ... resizable: true, columnResize: function(e) { var state = {}; this.columns.every(function(c,i) { state[c.field] = c.width; return true; }); var state_txt = JSON.stringify(state); localStorage['profile_userprofile_grid_column_width'] = state_txt; } } Now I want to restore column width saved in the previous user session. I can read columns width from the storage: var s
This has been possible up to .Net4.0 and IIS 7.5. The general idea is that you enable anonymous and forms authentication for your intranet site and in a subdirectory you enable windows authentication together with forms authentication and turn off anonymous. By disabling the forms 401 => 302 redirection with some custom code you will be able to get a hold of the users username and domain. If you google for a solution all roads seem to lead to this blog/solution: http://mvolo.com/iis-70-twolevel-authentication-with-forms-authentication-and-windows-authentication/ However when upgrading to .net
I am trying to get the values of minSdkVersion and targetSdkVersion from an apk stored on the device. Getting other details are discussed here, but only the targetSdkVersion is available in the ApplicationInfo class. Can the minSdkVersion be obtained other than by extracting the apk file and reading AndroidManifest.xml?
Sometimes, when I am creating reports, Microstrategy takes the wrong table for join (in case of using fields in report that appear in more than one table). For example if I have fact_table and fact_table_month, and they have the same fields, Microstrategy may take the fact_table_month for join when i need it to take tha fact_table. i know about the possibility to create a dummy metrics and use them in the report. I know about the possibility to manually change the logical size of tables, but i am looking for an official and proper way to solve this problem in MSTR. How can i force Microstrateg
Scenario: I want to input data from textbox into the database based on microsoft data base (.mdb) I already searching and find good clue and my result was here. This Code below was inside command button click event: using (OdbcConnection conn= new OdbcConnection()) { conn.ConnectionString = @"Driver={Microsoft Access Driver (*.mdb)};" + "Dbq=C:\\BlaBlaBla.mdb;Uid=Admin;Pwd=;"; conn.Open(); using (OdbcCommand cmd = new OdbcCommand( "INSERT INTO TABLENAME (FIELD1,FIELD2,FIELD3) VALUES ('" + txtFIELD1Input.Text + "','" + txtFIELD2Input.Text + "','" + txtFIELDInput.Text + "' )", conn)) { cmd.Execu
I am trying to execute this example code using Python2.7 and it is throwing me error as 'module' object has no attribute 'table'. Can any one help me regarding the correct html module. import html file = open('1.html', 'w') table_data = [ ['S.No', 'test1 - role'], ['1', 'a', 'b'], ['2', 'c', 'd'], ] htmlcode = html.table(table_data) c=htmlcode print htmlcode file.writelines(c)
I want to construct a RPC Program to transfer any type of files. But I am getting segmentation fault after running the client:such as ./file_client localhost >get /home/ab/1.txt >put /home/1.txt Segmentation Fault For your convenience I am pasting my client and server and .x code: file.x const MAXLEN = 1024; /* * Type for storing path */ typedef string filename<MAXLEN>; /* * Structure for sending request. Expects the path of the file * and the byte number at which to start reading the file from */ struct request { filename name; int start; }; /* * Type that represents the structute for request
I have installed oracle 10G XE but in the time of installation i may have not enabled the partion option.now when i am running the command select * from v$option where parameter = 'Partitioning'; its showing false .. when i tried to run this script CREATE TABLE products (partno NUMBER, description VARCHAR2 (60)) PARTITION BY HASH (partno) PARTITIONS 4 STORE IN (tab1, tab2, tab3, tab4); it shows that ORA-00439: feature not enabled: Partitioning i have important tables there if i delete the database then i will have to face problem. can i enable portioning option after installing??or i have to r
I'm new to CodeIgniter and trying to developing a fairly simple application with it -- just a form to process the registration for employees wanting a recreation center pass. I'm trying to separate things to make them cleaner. Here is the code: application/controllers/reccenter.php class RecCenter extends CI_Controller { public function register() { $data['title'] = "Utah Valley Rec Center Registration"; $this->output->enable_profiler(TRUE); // Put all the debug statements at the bottom of the page $this->load->helper('html'); $this->load->library('form_validation'); $this->form_validation->se
In my application, i am getting 3 "inactive InputConnection" warning (logCat below) every time I do anything with cursor on an EditText field. This warnings popup even if I select another EditText (with cursor is one EditText), or just click on a button, or whatever I do with cursor in an EditText. This behavior is consistent in all the pages (activities). Even if I click on any Menu button (to go another page) or back button with focus on an EditText field, the same set of warnings pop up. In some Activity where I don't have any EditText, I don't have this problem. This problem occurs when I
I saw that os.geteuid() is only available for unix, how to replace its usage in windows. I needed this because celery is using the function and for celery to run in windows I need this function alternative for windows. Please do help.
I am trying to save a number, date time and an image to access database using c# application. i have written a function which converts image to base64string format and then i use the function to get image as a string and later save it. I however get an error saying 'argument NULL exception was unhandled'. this error occurs at the following line in the code image.Save(stream, image.RawFormat);* my code is as follows: private void save_Click(object sender, System.EventArgs e) { string oneimg=ImageToBase64String(pictureBox1.Image); string twoimg=ImageToBase64String(pictureBox2.Image); OleDbConnec
Background I have a layout that has some special states (like being checked/pressed), and I wish to set its children to apply their own drawables based on this layout. i'm searching for an alternative of setting duplicateParentState to true for each of its children (and maybe even all of its descendants). What I've tried I've tried to make the custom view have an attribute of setting it to each of its children, but i couldn't find in which method call to apply this attribute to all of its children. in each method i've tried, it either returns 0 for getChildCount() or it just doesn't do anythin
How can I populate my select field options using database data from my model and set the selected option based on the user's POST submission? This is my view <?php foreach ($cart as $item): ?> <tr> <td><?php echo $item['name']; ?></td> <td><?php echo $item['qty']; ?></td> <td><?php echo number_format($item['subtotal'],2); ?></td> <?php echo form_open_multipart('site/confirmed') ?> <?php $option = array(); foreach ($instructor as $r) { $option[$r->id] = $r->instructor; } echo "<td>" . form_dropdown('instructor', $option) . "</td>"; ?> This is my model 'isbn' => $items['name'], 'price' => $items
I'm at the moment trying to send a right click to a computergame without affecting my visible mouse pointer. I'm not sure if the game just doesn't like it or if I'm doing something wrong. Here is the short-version of my code: WORD tx = 500; WORD ty = 500; HWND windowHandle = FindWindow(NULL,TEXT("Game title")); if (windowHandle != 0) { SendMessage(windowHandle, WM_RBUTTONDOWN, MK_RBUTTON, MAKELPARAM(tx, ty)); Sleep(50); SendMessage(windowHandle, WM_RBUTTONUP, MK_RBUTTON, MAKELPARAM(tx, ty)); Sleep(50); std::cout << "message sent..." << std::endl; } I tried this many times and made sure that th
I understand that my question is somehow wrong, but I'm still trying to solve this problem. I have an interface Programmer: interface Programmer { public function writeCode(); } and a couple of namespaced classes: Students\BjarneProgrammer (implements Programmer) Students\CharlieActor (implements Actor) I have this class names stored in array $students = array("BjarneProgrammer", "CharlieActor"); I want to write a function, that will return an instance of class if it's implementing Programmer interface. Examples: getStudentObject($students[0]); - It should return an instance of BjarneProgramme
I would like to style the DatePicker, but I cannot find how. I would like to edit the layout (whose reference can be found here: https://android.googlesource.com/platform/frameworks/base/+/36f469fa46bd009bfbc27d1350af5bde4a4dd378/core/res/res/layout/date_picker_holo.xml), but internalLayout is not recognized by the Android Studio editor <style name="MyDatePicker" parent="Widget.DatePicker"> <item name="android:internalLayout">@android:layout/date_picker_holo</item> </style> Anyone knows how to do it?
For one of my methods, its role is to switch the first and last elements of an array. It worked just fine when I had the array built into the method. But then I decided to just have it read in an array from main and now it doesn't work right. It replaces different numbers each time or sometimes doesn't replace anything and just copies the array. Examples: 20432 20432 and 44413 44431 and 42203 public static void main(String[] args) { int[] array = new int[5]; int length = array.length; for (int i = 0; i < length; i++) { array[i] = (int)(Math.random () * 5); System.out.print(array[i]); } System.
My project is faculty allocation. when i try to insert data, it shows the following exception. "com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'hourId' cannot be null" Can anyone help me how to overcome this problem? Please provide sample code to avoid this exception. My coding is <% Connection con = null; String StaffName = request.getParameter("StaffName"); // String subcode = request.getParameter("subcode"); String hourId = request.getParameter("hourId"); String daysId = request.getParameter("daysId"); String date = request.getParameter("date"); //String
I plan to create an Oracle database that will contain arrays of numeric data. Each array has from 2 to 4 dimensions, and on the order of 1000 data points. I will want to use the arrays in WHERE clauses, e.g. . Oracle's array support (VARRAYS, Nested Tables) seems disappointing; it's awfully hard for client software to retrieve the data in a useful way. Possible, but hard. Any advice is appreciated.
what is the convention to name interface and its implementation class in java? Interface : ISomeService Impl : SomeService or Interface : SomeService Impl : SomeServiceImpl Thanks!
For a program I have to write I am required to turn a 2 dimensional array of single digit intgers into a string of numbers separated by spaces. A test code is provided for me and when I run it, my code fails both arrayToString tests. I am unable to find where my logic error is. Someone help! public static String arrayToString(int[][] a) { String aString; aString = ""; int column; int row; for (row = 0; row < a.length; row++) { for (column = 0; column < a[0].length; column++ ) { aString = aString + " " + a[row][column]; } aString = aString + "\n"; } return aString; }
I have a project that requires sending live video stream to a web-client. I have a server app that actually makes live video stream out of Direct3D scene using DirectShow. I have my own DirectShow source filter and its output is compressed using WEBM codec. It works well when saving video stream to a file, that can later be viewed without any problems. But next step is to translate live video stream to a web client. I tryied to send it via TCP to my ASP.NET MVC4 application. My page controller looks as folows: public class VideosController : ApiController { /// <summary> /// Web API method to
I am writing a security system that denies access to unauthorized users. name = input("Hello. Please enter your name: ") if name == "Kevin" or "Jon" or "Inbar": print("Access granted.") else: print("Access denied.") It grants access to authorized users as expected, but it also lets in unauthorized users! Hello. Please enter your name: Bob Access granted. Why does this occur? I've plainly stated to only grant access when name equals Kevin, Jon, or Inbar. I have also tried the opposite logic, if "Kevin" or "Jon" or "Inbar" == name, but the result is the same. This question is intended as the can
The errors that show up are for undefined symbols, not the Cairo functions I copied from the example, but what I guess are internal functions. I have looked around and tried using $(pkg-config --cflags --libs cairo), verbatim from a common online example using the terminal. I tried that after using EXPORT=(my path to cairos .ps file). I currently have one option in CodeBlocks 'Link Libraries' in the linker settings: /usr/lib/x86-linux-gnu/libcairo.a Also, I have /usr/include/cairo in my compiler options. Errors: /usr/lib/x86_64-linux-gnu/libcairo.a(cairo-image-source.o)||In function _cairo_ima