add

Git does not recognize new folder adds and its sub directories

爷,独闯天下 提交于 2019-12-18 07:05:34
问题 I have: dirA/dir1 dirA/dir2 dirA has been added and I see it on the browser - when I click " dirA ", I see dir1 and dir2 , grayed out like I have explained below. dir1 and dir2 , both have more than one sub-directories and files. git add dir1 git commit -m "..." I get a message " On branch master, nothing to commit, working directory clean " I am not sure why it wont go through and I see those as "grayed out" on the GitHub repo via browser. Can someone help? I saw some similar threads on

Oracle SQL - Add Primary Key to table

夙愿已清 提交于 2019-12-18 05:45:27
问题 I have some columns with no primary key and want to add a primary key column . NAME Age ------------- Peter 45 Bob 25 John 56 Peter 45 Some collegues suggest to add a PK with a sequences and triggers : Add a auto increment primary key to existing table in oracle This is nice, but my customers use a Database User with no rights to add sequences or triggers . I want to prevent to contact dozens of DBA administrators to alter user rights or to run my scripts. This is my suggestion to add a PK

How do I transpose a List? [duplicate]

為{幸葍}努か 提交于 2019-12-17 20:54:56
问题 This question already has answers here : Transpose list of lists (10 answers) Closed 5 years ago . Let's say I have a SINGLE list [[1,2,3],[4,5,6]] How do I transpose them so they will be: [[1, 4], [2, 5], [3, 6]] ? Do I have to use the zip function? Is the zip function the easiest way? def m_transpose(m): trans = zip(m) return trans 回答1: Using zip and *splat is the easiest way in pure Python. >>> list_ = [[1,2,3],[4,5,6]] >>> zip(*list_) [(1, 4), (2, 5), (3, 6)] Note that you get tuples

c# sharpziplib adding file to existing archive

蓝咒 提交于 2019-12-17 20:46:04
问题 am trying to add a file to an existing archive using the following code. When run no errors or exceptions are shown but no files are added to the archive either. Any ideas why? using (FileStream fileStream = File.Open(archivePath, FileMode.Open, FileAccess.ReadWrite)) using (ZipOutputStream zipToWrite = new ZipOutputStream(fileStream)) { zipToWrite.SetLevel(9); using (FileStream newFileStream = File.OpenRead(sourceFiles[0])) { byte[] byteBuffer = new byte[newFileStream.Length - 1];

Add new data into PHP JSON string

谁说我不能喝 提交于 2019-12-17 19:38:44
问题 I have $data as JSON encoded data and I have this string: $new_data = "color:'red'"; that needs to be added to $data so that I can read it from it as a json string. How can I achieve this ? 回答1: you need to json_decode($data) first, then add the new key/value, and json_encode() it. 回答2: I was just searching for the solution to this and stumbled across this question (already one year old). The answers provided so far were not very helpful to me. So, hopefully this helps the next person. The

How can I add an anchor tag to my URL?

走远了吗. 提交于 2019-12-17 18:51:19
问题 MVC 3.net I want to add an anchor to the end a url. I tried to include an anchor query string but the hash '#' changes to %23 or something like that in the url. Is there a way of working around this? 回答1: There is an overload of the ActionLink helper that allows you to specify the fragment: @Html.ActionLink( "Link Text", // linkText "Action", // actionName "Controller", // controllerName null, // protocol null, // hostName "fragment", // fragment new { id = "123" }, // routeValues null //

Unable to track files within Git submodules

醉酒当歌 提交于 2019-12-17 07:08:10
问题 Problem: to add files at ./shells/smallApps/* to Git at ./.git/ when I do not have the files at ./.git/info/exclude nor at any .gitignore -files. This question is based on this tread where the problem is not solved completely. I run $git status ~/bin # On branch master nothing to commit (working directory clean) $git ls-files ~/bin Screen/dev/vim-open.screen --- cut --- I note that I do not have the files "shells/smallApps/*" at my Git $ls shells/smallApps/ ~/bin devTodo extract ~/bin I want

Dynamically add textViews to a linearLayout

ε祈祈猫儿з 提交于 2019-12-17 06:29:50
问题 I read this somewhere here and I totally lost it, but could use some assistance. My app is pulling the column names from sqlite into an array. I want to create a textview and edit text for each one (via the size of the array), and I remember reading somewhere that you can treat the textViews variable names like an array, but I don't know where that is now. So how would I dynamically create a textView and editText for however many listings are in an array? It was something like TextView tv[] =

How to add new column to MYSQL table

爷,独闯天下 提交于 2019-12-17 04:48:24
问题 I am trying to add a new column to my MYSQL table using PHP. I am unsure how to alter my table so that the new column is created. In my assessment table I have assessmentid | q1 | q2 | q3 | q4 | q5 Say I have a page with a textbox and i type q6 in to the textbox and press a button then the table is updated to assessmentid | q1 | q2 | q3 | q4 | q5 | q6 Thanks in advance <?php include 'core/init.php'; include 'core/admininit.php'; include 'includes/overall/overall_header.php'; adminprotect_page

Adding buttons with a void method

流过昼夜 提交于 2019-12-14 04:25:58
问题 I'm quite new to the programming circuit and I'm trying to learn Java systematically ending up at Swing for the moment. I think I get what void methods do and are used for but I can't wrap my head around this piece of example code (extracted from http://docs.oracle.com --BorderLayoutDemo): public class BorderLayoutDemo { public static void addComponentsToPane(Container pane) { JButton button = new JButton("Button 1 (PAGE_START)"); pane.add(button, BorderLayout.PAGE_START); } private static