Canvas drawing images
Vote count: 0 Im having a problem with drawing images. Everything works fine when i use c.fillRect() but the drawImage() isnt working for some reason. The image is in the same directory as the file and the variable box is defined outside of the function. window.onload = function () { var canvas = do...
swift text label update weekly
Vote count: 0 I am a begi er of for swift. In the homeviewController, I declare a label @IBOutlet weak var text: UILabel! How can I update this number by 1 from 0 each week from the day the app is installed? asked 1 min ago彭章龙 Let's block ads! (Why?)
cp-web "chaincode name may not be blank"
Vote count: 0 I've been getting this error upon deploying the cp-web hyperledger example code. As a note I haven't altered anything in the example code itself. It can register a user and I can log in, however when trying to view anything or creating a new commercial paper it doesn't seem to execute ...
MySQL - Update Rows with Selected Content
Vote count: 0 I'm trying to do a bulk update of some columns in a MySQL DB. This is a WordPress/WooCommerce site so some of these columns may look familiar. Basically what I'm trying to do is take the content from the post_content column in the wp_posts table, concatenate it with that post ID's meta...
Laravel RESTful controller add parameter to create
Vote count: 0 I am trying to use Laravel 5.2's RESTful resource controllers. However, when moving from my index to create, I would like to pass a parameter as the create page should be partially filled in. My temporary solution: Route::get('consultation/{id}', 'ConsultationController@create'); Route...
Saving a generated image on Matlab Gui
Vote count: 0 I am trying to save an image that I generated on a Matlab Gui. I tried following code with a push button: [Save,savename] = uiputfile('*.bmp','Save Figure As...') fname=fullfile(savename,Save); imwrite(handles.axes2, 'fname', 'bmp'); It doesn't work. Can anyone please help? asked 56 se...
AsyncTask and Memory Observability
Vote count: 0 I have the following class and i er "AsyncTask" (http://developer.android.com/reference/android/os/AsyncTask.html) defined. class SomeClassA { Long b = 0; void executeTask() { // executed on main thread. b = 1; new SomeAsyncTask().execute(); } private class SomeAsyncTask extends AsyncT...
Eloquent belongs to relationship not working
Vote count: 0 Ok so been trying to figure out how to setup this relationship. Using eloquent Lumen. I have two tables. A Listing table. which contains Consoles. I dont want an emum or plain text in their so I want to extract that into a console table. Console 1, console 2 etc. but i ca ot get the re...
How to capture words around regular expression pattern?
Vote count: 0 I have a String which is : let s : String = "The dog ate the cat." With the following patte : let p : NSRegularExpression = try! NSRegularExpression(patte : "\w( )?dog( )?\w"), options: .CaseInsensitive) My question is : How do I get the words before and after the patte 's occurrence? ...
Out Of Range Exception 2D Array To List Of Type Int
Vote count: 0 Why do I get an Out of Range Exception here? My Code -the method takes int[][] numbers as a Parameter- : List<int> myList = new List<int>(); for (int i = 0; i < numbers.GetUpperBound(0); i++) { for (int z = 0; z < numbers.GetUpperBound(1); z++) { myList.Add(intervals[i][z]); } } I trie...
What lengths code in matlab?
Vote count: 0 So I am trying to understand what length is all about. Say we have vector A = [1,2,3,4,5,6,7,8] and when we code up length(A) it spits out 8 for the # of elements.How does the length command work. Ive been thinking its a for loop like A = [could be any size]; for i = A % takes each ele...
troubles with nested query in MySQL
Vote count: 0 I'm looking at a query that I've made for half an hour or so and I can't find out what is wrong with my query: SELECT v.uzovi_code, SUM(v.voorspeld_aantal), FROM ( SELECT tl.stam_code_traject, tl.vs_code_maand_lopend, tl.aantal_trajecten, tl.uzovi_code, CASE WHEN vm.zp_maand IS NULL TH...
Confused About Laravel Providers and Contracts
Vote count: 0 Hi I am new to Laravel and I am try to grasp the concept of creating and using service providers and contracts in my development. I was reading this article How to Create a Service Provider in Laravel 5.1 It talked about how they are both created and used but I still have a hard time g...
Why Visual Studio has menstrual cycles so often?
Vote count: 0 In Visual Studio 2015 C++, real-time error analyser works very slow, it often marks different lines of code on screen with red underlines, for example that types are undefined(but they are defined). It disappears after some time, for example after rebuilding project, or just reopening ...
Return only unique rows form a Table
Vote count: 0 I have a Table with 4 columns and 7 rows. This table contains 1 Customer with the same ID same LNAME and FNAME. Also the table has 2 Customers with the same ID, but Different by LNAME or FNAME. That is the sales reps input error. Ideally my table should have only 2 rows [![UNIQUE CUSTO...