id
stringlengths
5
11
text
stringlengths
0
146k
title
stringclasses
1 value
doc_23504700
Screenshot of the view My code: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container...
doc_23504701
What's a good way to remove both the quotes and the comma from this so I can put it into an int field? Edit: The data is actually already in a MySQL table, so I need to be able to this using SQL. Sorry for the mixup. A: Here is a good case for regular expressions. You can run a find and replace on the data either be...
doc_23504702
Both are results of one-way syncs from the same SVN instance. (The changes in SVN are synched to git, but the changes in git are not synched back to SVN) the two repositories are not forks of each other. rep1/master branch contains a file file1.txt rep2/master branch contained the file file1.txt, but the file was delet...
doc_23504703
Each polynomial p is of the form: a0 + a1x + a2x^2 These are my polynomials: (1 - x + 0x^2, 1 + 2x + 0x^2, 0 + 0x + 0x^2) Here they are represented in code. I am using numpy.polynomial.Polynomial: basis_b = np.array([[Polynomial([1, -1, 0])], [Polynomial([1, 2, 0])], [Polynomia...
doc_23504704
A: Make sure that the column SSIS data type is not DT_DBTIMESTAMPOFFSET or DT_DBTIMESTAMP2. Since in the official documentation they mentioned that: The expression fails to validate when a date literal is explicitly cast to one of these date data types: DT_DBTIMESTAMPOFFSET and DT_DBTIMESTAMP2. You can try to conver...
doc_23504705
var iconUrl = "data:image/svg+xml;charset=utf-8," + escape(document.getElementById("builtMarker").innerHTML); var sizeX = 200; var sizeY = 200; var icon = { url: iconUrl, scaledSize: new google.maps.Size(sizeX, sizeY), anchor: new google.maps.Point(sizeX / 2, sizeY / 2) }; var m...
doc_23504706
ERROR: type should be string, got " https://github.com/dpaul24/hdmi_pass_through_ZyboZ7-10?_ga=2.34188391.796043983.1579510279-2100398226.1578999679\nSo after getting that working all i want to do is be able to effect the video output. To do this, I tried to set the rgb 24 bit vectors last 8 bits to 0, removing all blue from the output. If i try the following code (with or without the process block) i get a syntax error on the \"if\" statement line\nprocess is \nbegin\n if sw ='0' then\n vid_pData(7 downto 0) <= sw\n end if;\nend process;\n\nThe issue is I don't seem to be able to put this anywhere in the code without causing an error. Can someone explain what's happening here?\nFull code below:\n\nlibrary IEEE;\nuse IEEE.STD_LOGIC_1164.ALL;\n\nlibrary UNISIM;\nuse UNISIM.VComponents.all;\n\nentity hdmi_pass_top is\n Port ( \n sysclk_i : in std_logic; -- 125MH System Clock Input\n async_reset_i : in std_logic; -- Reset switch on board\n\n -- HDMI In/Rx\n tmds_rx_clk_p_i : in std_logic;\n tmds_rx_clk_n_i : in std_logic;\n tmds_rx_data_p_i : in std_logic_vector(2 downto 0);\n tmds_rx_data_n_i : in std_logic_vector(2 downto 0);\n hdmi_rx_hpd_o : out std_logic := '1'; -- HPD must be driven\n -- I2C\n sda_io : inout std_logic;\n scl_io : inout std_logic;\n\n -- HDMI Out/Tx\n tmds_tx_clk_p_o : out std_logic;\n tmds_tx_clk_n_o : out std_logic;\n tmds_tx_data_p_o : out std_logic_vector(2 downto 0);\n tmds_tx_data_n_o : out std_logic_vector(2 downto 0); \n\n sw : in std_logic\n );\nend hdmi_pass_top;\n\n\narchitecture hdmi_pass_top_arc of hdmi_pass_top is\n\ncomponent dvi2rgb_0\n port (\n TMDS_Clk_p : in std_logic;\n TMDS_Clk_n : in std_logic;\n TMDS_Data_p : in std_logic_vector(2 downto 0);\n TMDS_Data_n : in std_logic_vector(2 downto 0);\n RefClk : in std_logic;\n aRst : in std_logic;\n vid_pData : out std_logic_vector(23 downto 0);\n vid_pVDE : out std_logic; \n vid_pHSync : out std_logic;\n vid_pVSync : out std_logic;\n PixelClk : out std_logic;\n aPixelClkLckd : out std_logic;\n SDA_I : in std_logic;\n SDA_O : out std_logic;\n SDA_T : out std_logic;\n SCL_I : in std_logic;\n SCL_O : out std_logic;\n SCL_T : out std_logic;\n pRst : in std_logic\n );\nend component;\n\ncomponent rgb2dvi_0\n PORT (\n TMDS_Clk_p : out std_logic;\n TMDS_Clk_n : out std_logic;\n TMDS_Data_p : out std_logic_vector(2 downto 0);\n TMDS_Data_n : out std_logic_vector(2 downto 0);\n aRst : in std_logic;\n vid_pData : in std_logic_vector(23 downto 0);\n vid_pVDE : in std_logic;\n vid_pHSync : in std_logic;\n vid_pVSync : in std_logic;\n PixelClk : in std_logic\n );\nend component;\n\n\ncomponent clk_wiz_0\nport\n (-- Clock in ports\n -- Clock out ports\n clk_out1 : out std_logic;\n -- Status and control signals\n reset : in std_logic;\n locked : out std_logic;\n clk_in1 : in std_logic\n );\nend component;\n\nsignal vid_pData : std_logic_vector(23 downto 0);\nsignal vid_pVDE : std_logic;\nsignal vid_pHSync : std_logic;\nsignal vid_pVSync : std_logic;\nsignal pixelclk : std_logic;\nsignal locked : std_logic;\nsignal clk_200M : std_logic;\nsignal pixel_clk_sync_rst : std_logic;\n\nsignal sda_i : std_logic;\nsignal sda_o : std_logic;\nsignal sda_t : std_logic;\nsignal scl_i : std_logic;\nsignal scl_o : std_logic;\nsignal scl_t : std_logic;\n\nbegin\n\nclkwiz_inst : clk_wiz_0\n port map ( \n -- Clock out ports \n clk_out1 => clk_200M,\n -- Status and control signals \n reset => async_reset_i,\n locked => locked,\n -- Clock in ports\n clk_in1 => sysclk_i\n );\n\ndvi2rgb_inst : dvi2rgb_0\n port map (\n TMDS_Clk_p => tmds_rx_clk_p_i,\n TMDS_Clk_n => tmds_rx_clk_n_i,\n TMDS_Data_p => tmds_rx_data_p_i,\n TMDS_Data_n => tmds_rx_data_n_i,\n RefClk => clk_200M,\n aRst => async_reset_i, --Active high asynchronous RefClk reset\n vid_pData => vid_pData,\n vid_pVDE => vid_pVDE,\n vid_pHSync => vid_pHSync,\n vid_pVSync => vid_pVSync,\n PixelClk => pixelclk,\n aPixelClkLckd => open, -- \n SDA_I => sda_i,\n SDA_O => sda_o,\n SDA_T => sda_t,\n SCL_I => scl_i,\n SCL_O => scl_o,\n SCL_T => scl_t,\n pRst => '0' -- Active high PixelClk synchronous reset\n );\n\n\nSDA_IOBUF_inst: IOBUF\n generic map(\n DRIVE => 12,\n IOSTANDARD => \"DEFAULT\",\n SLEW => \"SLOW\"\n )\n port map(\n O => sda_i, -- Buffer output\n IO => sda_io, -- Buffer inout port(connect directly to top-level port)\n I => sda_o, -- Bufferinput\n T => sda_t -- 3-state enable input,high=input,low=output\n ); \n\n\n\nSCL_IOBUF_inst: IOBUF\n generic map(\n DRIVE => 12,\n IOSTANDARD => \"DEFAULT\",\n SLEW => \"SLOW\"\n )\n port map(\n O => scl_i, -- Buffer output\n IO => scl_io, -- Buffer inout port(connect directly to top-level port)\n I => scl_o, -- Buffer input\n T => scl_t -- 3-state enable input,high=input,low=output\n ); \n\nrgb2dvi_inst : rgb2dvi_0\n port map (\n TMDS_Clk_p => tmds_tx_clk_p_o,\n TMDS_Clk_n => tmds_tx_clk_n_o,\n TMDS_Data_p => tmds_tx_data_p_o,\n TMDS_Data_n => tmds_tx_data_n_o,\n aRst => async_reset_i,\n vid_pData => vid_pData,\n vid_pVDE => vid_pVDE,\n vid_pHSync => vid_pHSync,\n vid_pVSync => vid_pVSync,\n PixelClk => pixelclk\n );\n\nend hdmi_pass_top_arc;\n\n\nEDIT: changed my if statement to\nvid_pData(7 downto 0) <= \"00000000\" when sw = '0';\n\nand it got rid of the error but the implementation failed. The failure is: \n\n[DRC MDRV-1] Multiple Driver Nets: Net\n dvi2rgb_inst/U0/GenerateBUFG.ResyncToBUFG_X/vid_pData[0] has multiple\n drivers: vid_pData_reg[0]/Q, and\n dvi2rgb_inst/U0/GenerateBUFG.ResyncToBUFG_X/poData_reg[0]/Q.\n\n\nA: You're not writing software, you're designing hardware. Your extra code drives signal vid_pData. So, does component dvi2rgb_0. So you have two drivers on that signal. A short circuit in other words. \nAlso, you do not say what value vid_pData should take if sw is not equal to '0'. Therefore, you will get latches in your hardware. (Google \"inferring a latch\".) \nYou need a new signal, eg:\nsignal vid_pData_new : std_logic_vector(23 downto 0);\n\nthen you need to assign a value for both sw equals '0' and '1', otherwise you will get a latch:\nvid_pData_new(7 downto 0) <= vid_pData(23 downto 8) & \"00000000\" when sw = '0' else vid_pData;\n\nThe & operator is the concatenation operator. Finally, you need to drive component rgb2dvi_0 with your new signal:\nrgb2dvi_inst : rgb2dvi_0\n port map (\n TMDS_Clk_p => tmds_tx_clk_p_o,\n TMDS_Clk_n => tmds_tx_clk_n_o,\n TMDS_Data_p => tmds_tx_data_p_o,\n TMDS_Data_n => tmds_tx_data_n_o,\n aRst => async_reset_i,\n vid_pData => vid_pData_new, -- <-----------------\n vid_pVDE => vid_pVDE,\n vid_pHSync => vid_pHSync,\n vid_pVSync => vid_pVSync,\n PixelClk => pixelclk\n );\n\n\nCan you see what has been done here? We have inserted a new piece of hardware that drives the new signal vid_pData_new and have specified its value for both possible values of sw. We must do this, otherwise we will get latches. We are designing hardware, not writing software.\n"
doc_23504707
AGR_TERR_DEF_TERRS ID DEF_ID TERRITORY_ID (foreign key links to TERRITORIES.ID) TERRITORIES ID NAME PARENT_ID (parent_id and id are recursive) Given two DEF_IDs, I need a function which checks whether the territories of one is a complete subset of the other. I've been playing with CONNECT BY, and INTERSEC...
doc_23504708
The example given in the documentation is: import { Autocomplete } from 'formik-material-ui-lab'; const options = [{ title: 'The Shawshank Redemption', year: 1994 }, ...] <Field name="name" component={Autocomplete} options={options} getOptionLabel={(option: Movie) => option.title} style={{ width: 300 }} r...
doc_23504709
Path for project must have only one segment I only just got through a previous problem to straight away come to the next one , also when i try and created AVD , when i press the button "okay" , it does nothing , the box does not even close , any help ? cheers , A: This should fix the probelm: Project -> Properties ->...
doc_23504710
import java.util.*; public class test { public static void main(String[] args) { Scanner in = new Scanner(System.in); Deque<Integer> deque = new ArrayDeque<>(); HashSet<Integer> set = new HashSet<>(); int n = in.nextInt(); int m = in.nextInt(); int max = Integer.MIN...
doc_23504711
$sql ="SELECT * FROM wp_users u LEFT JOIN wp_usermeta um1 ON u.ID = um1.user_id LEFT JOIN wp_usermeta um2 ON u.ID = um2.user_id WHERE um1.meta_value= '1' AND um1.meta_key = 'show' GROUP BY u.ID"; $users = $wpdb->get_results($sql);
doc_23504712
{ "user_id":1, "payment_type":"point", "order_boxes":[ { "for_friend_name":"Yansen", "order_box_items":[ { "product_id": 1, } ] } ] } I can validate the request up to "order_boxes" array leve...
doc_23504713
Since EXT is quite complex, I think creating a jar containing a modified class would be a good choice (Liferay does the same while giving patch for any bug). Anybody can provide me the exact steps to create Liferay patch like jar. A: Since Liferay 6.0 there's only ext plugins - I find them a lot easier to handle than ...
doc_23504714
Could it be the fact that the Extension Library isn't correctly installed? Does one have to install it separately on an FP7 server? Some rights issue maybe? Or what else could be the problem? The error message in logreader.nsf shows this: java.lang.AbstractMethodError: com/ibm/xsp/extlib/minifier/ExtLibLoaderExtension...
doc_23504715
- (IBAction)contact1:(id)sender { ABPeoplePickerNavigationController *picker1 = [[ABPeoplePickerNavigationController alloc] init]; picker1.peoplePickerDelegate = self; [self presentModalViewController:picker1 animated:YES]; } - (void)peoplePickerNavigationControllerDidCancel: (ABPeoplePickerNavigationController *)peop...
doc_23504716
Possible Duplicate: How to deal with SQL column names that look like SQL keywords? SELECT thing.Column FROM mytable thing When I run this, SQL Server says that I have "Incorrect syntax near the keyword 'Column' A: You can enclose the column name in square brackets, thusly: SELECT thing.[Column] FROM mytable thing ...
doc_23504717
public SomeClass { private List<string> _strings = new List<string>(); public IEnumerable<string> Strings { { get return _strings; } } } How would I do the mapping for _strings? I tried this, but it complains about the List typehandler not being found, which it doesn't complain about if I mapped it...
doc_23504718
@Configuration public class ParallelFlowConfig { @Autowired private JobBuilderFactory jobBuilderFactory; @Autowired private StepBuilderFactory stepBuilderFactory; @Bean public Tasklet tasklet() { return new CountingTasklet(); } @Bean public Flow syncFlow() { retur...
doc_23504719
A: found out that 4.4.3 doesn't have this issue. https://code.google.com/p/android/issues/detail?id=63346
doc_23504720
I have a file, images.tar.gz. , which contains about 7000 .png images. I need to unzip this file. But when I use terminal to unzip it tar zxvf /Users/JourneyWoo/images_002.tar.gz I always encounter this problem ... ... x images/00003910_000.png x images/00001934_002.png x images/00002250_001.png: gzip decompression ...
doc_23504721
I have upgraded to ruby 2.4.5 then all the gems in our gemfile with Rails 5.2.2. The mysql2 gem is 0.5.2. I am running our tests and I have randomly Mysql2::Error # /usr/local/rvm/gems/ruby-2.4.5@clm/gems/activerecord-5.2.2/lib/active_record/connection_adapters/mysql/database_statements.rb:45:in `affected_rows' # /us...
doc_23504722
<asp:Label ID="lblShorName" runat="server" Text="<%#Customer.ShorName%>" /> lblShorName.DataBind(); and lblShorName.Text = Customer.ShorName; A: There isn't much of a difference that I know of (though I'll be interested in other people's answers to correct me if I'm wrong on that). It's just a matter of coding s...
doc_23504723
React 17: React 18: The exact error I get: Looking at the react types we can go from DetailedHTMLProps<TdHTMLAttributes<HTMLTableDataCellElement, HTMLTableDataCellElement> to TdHTMLAttributes to HTMLAttributes to DOMAttributes where finally children is defined as children?: ReactNode | undefined; See https://github....
doc_23504724
Some of my components using framer-motion to animate them I've installed my lib with NPM on my project. But when I try to use one of my components of my library, if this component is animated with Motion I got an error : TypeError: emotionIsPropValid_1 is not a function isPropValid node_modules/myRepo/myLib/build/inde...
doc_23504725
I then decided to start the project from scratch and guess what? the problem still persists. What could I have possible done wrong? I don't really know where to look because I don't even get an error message. Please help??? A: I would try debugging that with a tool like GapDebug (https://www.genuitec.com/products/gapd...
doc_23504726
{ "aaa-prod-release-branch": { "value": "release/S1.1-000000T01" }, "bbb-prod-release-branch": { "value": "release/S2.2-000000T02" }, "ccc-prod-release-branch": { "value": "release/S3.3-000000T03" } } ################File-2.json#################### { "a...
doc_23504727
I am trying to restart browsers and so far what I am doing is process.kill() and process.start() to restart the browsers. But by using this approach the browsers display a screen asking if the user wants to restore the previous session. I have tried storing the currently open url and then opening the url in the new br...
doc_23504728
The message header should include the sender's name, date, and seperator field. Anyone can help on this ? A: RIM released some sample code to build Advanced UI interfaces. There you can find a Negative Margins example that simulates a Screen for Blackberry Messenger.
doc_23504729
The compiler complaint so I changed the method parameter signature to Map<Integer, ?>, and now I can call it, but have different problems. The method is basically as follows: private void methodA (Map<Integer, ?> inOutMap, Integer key, Object value) { Set<Object> list = new HashSet<Object>(); if (!inO...
doc_23504730
dataGridView1.Columns["Amount"].DefaultCellStyle.Format = "#,###.00"; This code works if all cells of the column are not null. But when one cell of the column have null value, it returns an error "'System.NullReferenceException'". How can I exempt null cells from being formatted to 2 decimal places?
doc_23504731
I followed the guide described here on how to stream back a Response in Flask. My pseudo-code in the frontend essentially looks like this: return Response(stream_with_context(generate())) Within generate() I do the following: def generate(): # make blocking api call data = requests.get(url) for x in data...
doc_23504732
The interface builder shows the label correctly as follows However, when the app is run on the simulator, the following is shown- Can anyone point out why this is happening? A: Seeing as it works with a system font such as Arial, it is probably a problem with the custom font not being recognised. Try the following: ...
doc_23504733
$url = /* API URL */; function getJson($url) { $cacheFile = 'cache' . DIRECTORY_SEPARATOR . md5($url) . '.json'; if (file_exists($cacheFile)) { $fh = fopen($cacheFile, 'r'); $cacheTime = filemtime($cacheFile); if ($cacheTime > strtotime('-60 minutes')) { $json = fread($fh); return $json; ...
doc_23504734
Edit: I'm almost sure it's the client code NOT POSTing any stats to the server, but neither guides below explain how should this be enabled: is there a configuration setting that I am missing? I have been following the quick starts on both OpenZipkin and Spring Sleuth: I have a running Zipkin server from docker-zipkin ...
doc_23504735
#include <stdio.h> int main() { int n; scanf("%d",&n); int number; scanf("%d",&number); int firstMax, secondMax, thirdMax; firstMax = secondMax = thirdMax =number; for(int i = 1; i<n ; i++){ scanf("%d",&number); if(number > firstMax){ ...
doc_23504736
public ArrayList<String> getData() { // TODO Auto-generated method stub String[] columns = new String[] { KEY_ROWID, KEY_MODULE_CODE, KEY_MODULE_NAME, KEY_LECTURE_PRACTICAL, KEY_LECTURE_PRACTICAL_SHORT, KEY_LECTURE_DAY, KEY_LECTURE_DAY_SHORT, KEY_START_TIME, KEY_END_TIME, ...
doc_23504737
import pulp from pulp import * from pulp.solvers import CPLEX_PY from pydfs_lineup_optimizer import get_optimizer, Site, Sport,CSVLineupExporter from pydfs_lineup_optimizer.solvers.pulp_solver import PuLPSolver import time start_time = time.time() class CustomPuLPSolver(PuLPSolver): LP_SOLVER = pulp.CPLEX_PY(msg=0)...
doc_23504738
Edit: I finally figured out what the issue was. To save other people time I wanted to post the solution here. BluePay calculates the transaction MD5 hash differently than Authorize.net. Because of this, without a code change, all orders get rejected because the MD5 doesn't match. In order to use the authorizenet_aim.p...
doc_23504739
I created a fresh Vue project through vue init I added bootstrap 4 with yarn add bootstrap@4.0.0-alpha.6 In main.js I try to import bootstrap and jquery: import Vue from 'vue'; import jQuery from 'jquery'; import bootstrap from 'bootstrap'; import App from './App'; import router from './router'; But I get: Uncaught ...
doc_23504740
A: Pass it as String and parse it to server using SimpleDateFormat to get the Date back For example: Date date = new SimpleDateFormat("dd-MM-yyyy").parse("10-10-2010");
doc_23504741
HTML: <ol> <li> <span class="icon-hamburger"></span> </li> </ol> CSS/SASS: .icon-hamburger:focus { @at-root ol li #{&} { background-color: #fff; } } A: There is no solution for IE and Edge but for Chrome and Firefox you can use :focus-within CSS pseudo-class. The :focus-within CSS pseudo-class repre...
doc_23504742
test <- group_by(trials, SubjID) number <- summarise(test, nsubj=n()) sum(number$nsubj != 12) but when I click on Knitpdf I get the following error: error in eval(expr,envir,enclos): could not find function "group_by" Calls: <Anonymous>...handle->withCallingHandlers->withVisible->eval->eval Execution halted ...
doc_23504743
class Table { public: explicit Table(const int s); ~Table(); Table(const Table&) = delete; Table &operator = (const Table&) = delete; A: = delete tells the compiler to not generate the specified function for the class, if it's one of the special member functions. Or to remove the function from the cl...
doc_23504744
Am pretty much a new user and wondering where to look for a cheatsheet? A: http://www.viemu.com/vi-vim-cheat-sheet.gif is my favourite. A: Here: https://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/gvim/gvim.html Is a tutorial and a few sheets. A: http://tnerual.eriogerg.free.fr/vim.htm...
doc_23504745
How can I implement a touch event like a normal UIButton where I can cancel a touch event upon tapping and dragging the finger outside the UIButton to cancel a touch. For my current code, If I drag my finger inside the button, it calls the touchesCancelled event. I am using the TouchUpInside event for performing method...
doc_23504746
import Alamofire public protocol MyResponseType { typealias Value typealias Error: ErrorType var request: NSURLRequest? { get } var response: NSHTTPURLResponse? { get } var data: NSData? { get } var result: Alamofire.Result<Value, Error> { get } init(request: NSURLRequest?, response: NSHTTPU...
doc_23504747
My Gemfile: gem 'rails', '~> 5.1.5' gem 'devise' gem 'bootstrap-sass', '~> 3.3.7' gem 'sass-rails', '>= 3.2' gem 'coffee-script', '~> 2.4', '>= 2.4.1' gem 'sqlite3' gem 'puma', '~> 3.7' gem 'autoprefixer-rails', '~> 8.1' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.2' gem 'sprockets-rails', '~> 3.2', '>= 3.2.1'...
doc_23504748
tks this is my code, i wanna to make the textedit side by side (2 in each line) <v-form ref="form" v-model="valid"> <v-select :items="especialidades" v-model="especialidadeSelecionada" item-value="cdCartorioNatureza" item-text="nome" lab...
doc_23504749
for example: Date selection : 2020-04-18 to 2020-04-18 Expected date: 2020-04-11 to 2020-04-18 Reason is that most dashboard required single date but some required time series which shows last 7 days result. Here is the code I prepare in custom query. SELECT distinct(dt) FROM mytable WHERE dt >= date_add('da...
doc_23504750
gst-launch-1.0 udpsrc port=5004 buffer-size=622080 ! avdec_h264 ! videoconvert ! fpsdisplaysink A: Here is the solution below; (Çözümüm aşağıdadır.) // Gstreamer init - İlklendir Gst.init(Version.BASELINE, "BasicPipeline"); // Create a named pipeline - sink isimli bir pipeline yarat. pipeline = (Pipeline) Gst.parseL...
doc_23504751
The problem is when I put text in the textbox and and submit the form, it makes the request and updates the state for a split second, then goes back to the original state. I'm populating the component right now using hardcoded json data just to see this component work. Is the entire app refreshing after the network cal...
doc_23504752
ERROR: type should be string, got "https://www.youtube.com/watch?v=8BiOPBsXh0g\nI've got PyHook but on PyWin32 I tried downloading it from the site given in the video. If anyone can send me a download link for it, I will be grateful and this would help me.\nBTW I am using Python 2.7 because that is what PyHook is on, I wouldn't mind if you could send me both links for 3.6.3 either that would be good or guide me through it! :D\nimport pyHook, pythoncom, sys, logging\n\nfile_log - 'C:\\\\important\\\\log.txt'\n\ndef OnKeyboardEvent(event):\n logging.basicConfig(filename=file_log, level=logging.DEBUG, format='%(message)s')\n chr(event.Ascii)\n logging.log(10,chr(event.Ascii))\n return True\n\n\nhooks_manager = pyHook.HookManager()\nhooks_manager.manger.KeyDown = OnKeyboardEvent\nhooks_manager.HookKeyboard()\npythoncom.PumpMessages()\n\n"
doc_23504753
Basically: is it possible to add if, elif.... else in a format string? l = ['it', 'en', 'es'] for i in l: print('{tit}'.format(tit='Ciao' if i == 'it' elif i == 'en' tit='Hi' else 'Hola')) A: Author of the questions asks if it is possible to add if, elif, else in string formating. So, I do assume author wants to...
doc_23504754
With openpyxl, in order to apply conditional formatting, I need a range string: rule = ColorScaleRule(start_type="min", start_color="FFFFFF", end_type="max", end_color="247CBD") range_string = "A1:D10" worksheet.conditional_formatting.add(range_string, rule) If I try to use a range string to sel...
doc_23504755
Edit, I'll include the first week of the fixtures array var teams = [ {id: 1, name: "AC Milan", GP:0, W: 0, D: 0, L:0, GF:0, GA:0, pts:0}, {id: 2, name: "AS Roma", GP:0, W: 0, D: 0, L:0, GF:0, GA:0, pts:0}, {id: 3, name: "Atalanta", GP:0, W: 0, D: 0, L:0, GF:0, GA:0, pts:0}, {id: 4, name: "Bologna", GP:0, W: 0, D: ...
doc_23504756
* *Post -------------------- id | title | content -------------------- 1 | lorem | lorem ipsum.. 2 | ipsum | lorem ipsum.. 3 | dolor | lorem ipsum.. *category ------------- id | category ------------- 1 | cat-1 2 | cat-2 *post_category --------------------...
doc_23504757
#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <string.h> char * VOWELS ="aeiouAEIOU"; void printLatinWord(char *a); int main(int argc, char **argv){ char phrase[100]; char *word = malloc(sizeof(char) *100); printf("Enter the phrase to be translated: \n"); fgets(word, 100, st...
doc_23504758
const addRate = (e: { charCode: KeyboardEvent }) => { if (e.charCode >= 48) { ... } } I get this: 'Operator '>=' cannot be applied to types 'KeyboardEvent' and 'number'.ts(2365)' But e.charcode is indeed a KeyboardEvent and this works somewhere else on my app const addString = (e: { target: HTMLInputElement }...
doc_23504759
var query = datastore.createQuery('Todo') query.groupBy(['completed']); query.filter('title', 'abc'); query.run(function (err, items) { console.log(err, items) if (err) { callback(err); return; } callback(null, items.map(entityToTodo)); }); and i got this error: { [Error: Precondition Failed] code: 4...
doc_23504760
I'm trying to use make, and it seems that bash doesn't recognize gcc. Tried adding it to PATH, but nothing changed. The weird thing is - cmd does recognize gcc. Do I need to install it again? A: Have you tried to install gcc to the Ubuntu Sybsystem for Windows? sudo apt install gcc
doc_23504761
<div id="slider" class="images"> <img src="img/image1.png" height=200 width=200> <p>Image1 corresponding text here</p> <img src="img/image2.png" height=200 width=200> <p>Image2 corresponding text here</p> <img src="img/image3.png" height=200 width=200> <p>Image3 corresponding...
doc_23504762
OSError: Operation not permitted [Errno 1]. Some extrange is that this video file can play with video_player and i can work good with camera file and image pick file generated with image_picker, but video gallery file can not do another thing than play with video_player. For example, trying to get file size or copy i...
doc_23504763
data Henk But what is the purpose of a type (or kind?) that doesn't have a constructor? A: Type-level machinery often requires types to exist but never constructs values of such types. E.g., phantom types: module Example (Unchecked, Checked, Stuff()) where data Unchecked data Checked data Stuff c = S Int String Doub...
doc_23504764
I was trying to use django model forms with ndb model. Following is the relevant portions from my setup: app.yaml: libraries: - name: webapp2 version: "2.5.1" - name: jinja2 version: latest - name: markupsafe version: latest - name: django version: 1...
doc_23504765
The script: window.onload = function () { setInterval(function(){ window.open( "http://www.google.com/" ); }, 3000); }; *I know this would be inconvenient to the users,its just experimental. A: You will need to start your Firefox extension development by following this guide: http://kb.mozillazine.org/Getting...
doc_23504766
$seq1 = "ACTTCAATCGGT"; $seq2 = "ACTGGTCAATCGGT"; $len1 = length($seq1); $len2 = length($seq2); The sequence above. @matrix = (); my $gapscore = -1; my $matchscore = 1; my $mismatchscore = 0; $matrix[0][0] = 0; # initialize 1st row and 1st column of matrix decreasing by $gapscore for ($i = 1; $i < $len1; $i++) { ...
doc_23504767
But it is not showing the progress dialog. Please help me. setContentView(R.layout.activity_main); mywb = (WebView) findViewById(R.id.webView); ProgressDialog progressDialog = new ProgressDialog(this); progressDialog.setTitle("The Book Street"); progressDialog.setMessage("Loading"); progressDialo...
doc_23504768
I want to make it responsive so that it can adapt to every screen size. SizedBox( width: 50, height: 50, child: CircularProgressIndicator( value: 0.5, backgroundColor: Color(0xff19454A), valueColor: AlwaysStoppedAnimation(Color(0...
doc_23504769
<% using(Html.BeginForm("Create", "Object", Method.Post)) { foreach(var prop in Model.Properties) {%> <div id="prop-<%= prop.name %>"> <input name="<%= prop.name%>" value="" type="text" /> <% if(prop.type == "Lines") {%> <input type="button" value="Add More" onclick="$('#prop-<%= ...
doc_23504770
The problem is that I just can't do: cont char* RecorderName = SDL_GetAudioDeviceName() When I run it into debug mode, my RecorderName variable is just = NULL instead of the adress that SDL_GetAudioDeviceName returns. Do you know any solution for that?
doc_23504771
On one of the pages I set cookies like: $.cookie("userName", userName, { path: '/' }); $.cookie("currentTime", currentTime, { path: '/' }); On another page I try to access it like: alert($.cookie('userName')); But the alert shows 'null', although the same code works perfectly on android and blackberry. Does Symbian...
doc_23504772
#!/bin/bash SOURCEDIR=/home/kyle/Smaug/csis252 DESTDIR=/home/kyle/Desktop/csis252 copy() { local DIRECTORY=$1 for FILE in `ls $DIRECTORY` do if [ -f $DIRECTORY/$FILE ] then echo $FILE file cp $DIRECTORY/$FILE $DESTDIR/$DIRECTORY/$FILE fi if [ -d $F...
doc_23504773
I use to use PHPstorm, there was a function that you can find the classes directly, by clicking on it. When I use visual studio code you need to search all files. A: shortcut: ctrl + p This will behave just like the 'double-spacebar' of JetBrains products. A: This should work with the PHP IntelliSense extension: PHP...
doc_23504774
?? thank you for your help Example for website: http://www.voirfilms.co $PARAM_hote='localhost'; $PARAM_nom_bd='venteformation'; $PARAM_utilisateur='root'; $PARAM_mot_passe=''; try{ $connexion = new PDO('mysql:host='.$PARAM_hote.';dbname='.$PARAM_nom_bd, $PARAM_utilisateur, $PARAM_mot_passe); } catch(Exception $...
doc_23504775
Index: dir/file.xml =================================================================== --- dir/file.xml (revision 178) +++ dir/file.xml (working copy) @@ -7,7 +7,7 @@ <markup> - <markup /> + <markup></markup> <markup> <markup> @@ -20,6 +20,7 @@ <markup> <markup> + <tag> <markup> To...
doc_23504776
This is the original HTML content and this is how it is getting shown in PDF. I used the same library in other places for the same project, it was working fine. None of the images or graphs were getting out of propertion, but only here it is showing this error. What could be the reason? This is my TS code: exportPDF(){...
doc_23504777
<button onClick='edit(this, "<?php echo $this->result[$i]["type"]; ?>","<?php echo $quality; ?>", "<?php echo json_encode($stuff); ?>", ...)"> </button> I just added the json data $stuff. Now when I'm in javascript to get some values: jQuery(stuff).each(function(index) { console.log( "The key is " + this.n...
doc_23504778
THIS LOADS FOR EVERYBODY <script src="lib/ionic/js/ionic.bundle.js"></script> THIS LOADS FOR ANDROID ONLY, NOT FOR IOS <script src="lib/angular-material/angular-material.js"></script>
doc_23504779
What can I do to improve it ? $query = "SELECT A,B,C, (SELECT COUNT(*) FROM comments WHERE comments.nid = header_file.nid) as my_comment_count FROM header_file Where A = 'admin' " edit: I want header records even if no comments are found. A: You can add index on a A and nid column. A: I am using an ...
doc_23504780
The values on OverView are higher (seems that there are some requests that take 20 seconds and mess up the average. I have no traces of these requests looking in the Insights response time or trying to search the requests that take more time. Insights values seem more correct because seems that the web app is working p...
doc_23504781
firebase.initializeApp(firebaseConfig); firebase.analytics(); var storageRef = firebase.storage().ref(); window.onload = function () { var uploader = document.getElementById('uploadbar'); var filesbutton = document.getElementById('filesbutton'); filesbutton.addEventListener('change', function (e) { ...
doc_23504782
input = kb.nextInt(); Stack trace: Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Unknown Source) at java.util.Scanner.next(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at main.MainDriver.main(MainDriver.java:50) ...
doc_23504783
for example : const menu = [ {name : "firstFood"},{name:"Second Food"} ] <MenuTable menu ={menu} /> and in other component I console.log it. const MenuTable = (props)=>{ console.log(props.menu) } In first render it shows undefined then it shows data A: I think you wrote: const [menu, setMenu] = useState() Then you...
doc_23504784
Clicking edit will disable all controls and enable the relevant save button and textbox with text you want to edit. I'm trying to re-enable these controls that were disabled and I'm using some code such as this after a successful save: If String.IsNullOrEmpty(txtbox2.Text) = True Then txtbox...
doc_23504785
* *get the POST values to array.. *Select the foreign key.. *Some other INSERT-operations $insertdates = "INSERT INTO dates (asid,acq_date, serv_guaranteedate , maintenance_period, expiration_date) VALUES ('$foreignkey','$uservalues[1]' ,'$uservalues[4]','$userval...
doc_23504786
The drawback is that I have the date and the time together (i.e., "2019-04-06 07:45:00"). I've tried to calculate the differences between cells, but what I obtain is the difference between dates, and times between 00:00:00 and 07:45:00 are included in the wrong day. Is there a way to calculate the 24h periods? I also t...
doc_23504787
Rating bar in a element that is part of list view: <RatingBar android:isIndicator="true" android:id="@+id/itemRatingBar" style="?android:attr/ratingBarStyleSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentRight="...
doc_23504788
The cookies themselves are obviously useless - Gravatar works fine if I block them. They are likely for tracking purposes, which is another reason to block them. My questions to Gravatar have not been answered. So how can I stop Gravatar setting cookies? A: After my second email I got this response: Hey, Thanks for c...
doc_23504789
<script> <!-- var text1="bla"; var text2="bla"; //--> </script> What does that do? Comment out? Why? And do you still use that today? A: It is used to comment out lines in html similar to "text"/'''text''' in python or // in a few other languages. Commenting a line will not process/execute it.
doc_23504790
A: There isn't really an easy way to do this, mainly because, I'm guessing, your build scripts are exactly that, scripts, written in an imperative fashion, whereas make is declarative (like Prolog), which is a real shift in mindset. If you're using GCC (and I think GreenHills or Intel), you can have the compiler gener...
doc_23504791
For example, this print "ok", "ok", rather than "fail", "ok" as expected: openssl ran 8 if [ $? -eq 0 ]; then echo "ok" else echo "fail" fi openssl rand 8 if [ $? -eq 0 ]; then echo "ok" else echo "fail" fi A: openssl ran 8 2>/tmp/err if [ -s /tmp/err ] then echo fail else echo ok fi
doc_23504792
const inputText = await Selector('textarea[name="url-input"]').value; console.info(`This is my URL of interest ${inputText}`) Then I want to use inputText to execute a bash command, say (for simplicity) echo inputText How can this be accomplished from my testcafe script? I couldn't find a related post of documentatio...
doc_23504793
There is a parameter inside my web application (but it is only used in one url, not in all) which I left on purpose with a command injection vulnerability, to fix this I decided to fix it using AWS ACL and putting a Regex rule telling it that when the "path" parameter doesn't match the regular expression I should block...
doc_23504794
1.The Function does not seem to create any Object. 2.How can we call methods on response we haven't defined any. var http = require("http"); http.createServer(function(request,response)) { response.writeHead(200,"Content-Type":"text/plain"); response.write("Hello World"); response.end() }).listen(8888); A: First of a...
doc_23504795
sudo apt-get install nodejs npm git git clone https://github.com/googlecreativelab/coder cd coder/coder-base/ npm install It works fine until I enter the 4th command "npm install" when I do that I get the following errors: npm ERR! Error: failed to fetch from registry: express/3.1.0 npm ERR! at /usr/share/npm...
doc_23504796
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.tangerine.ca%2Fen%2Flandin…tM7QqqESiaNgGMvpibHdshV98FB21NJuKkSoM-OQfdcd2HuAMi6JS_MMgb00SdAYDaQZ2mIN-K, but I want to get link in format http://www.tangerine.ca/?utm_campaign=Facebook&utm_medium=social&utm_source=facebook.com How I can convert first link to the second? I...
doc_23504797
I already know how to create the transparent background, using CreateHostBackdropBrush() etc. I only want to know if someone have some idea on the particular texture used, maybe using some Composition effect? Here is an example: Any idea? I love it!
doc_23504798
To illustrate, it currently looks like this: I've been trying to achieve a result like this: ... or like this: I've tried the following methods of hiding or removing the duplicative .record-label div, without success — and without error messages to assist in further diagnosis. function getRecordContent(obj, pos) { ...
doc_23504799
private static final int SIZE = 16; //Bytes private static final int BBSIZE = 48 * SIZE; ByteBuffer blockMap = ByteBuffer.allocateDirect(BBSIZE); byte[] readAtOffset(final int offset) throws BufferUnderflowException, IndexOutOfBoundsException { byte[] dataRead = new b...