erase

    0熱度

    2回答

    我想知道是否有方法來確定是否有任何流在程序中打開? 我正在使用我的一些代碼和另一些代碼,我的目標是能夠多次寫入同一個文件,每次擦除它並重寫。但是,我認爲在某個地方,屬於這個其他組的代碼可能忘記關閉一個流,或者Java無法處理它,也許?它總是在文件的末尾寫入,而不是在空白文件的開頭。它不會刪除,如果它已被程序打開,我不能重命名它。 如果它是一個開放流問題,我想關閉流(我已經通過代碼,並且似乎無法找到

    -1熱度

    2回答

    我用這個代碼繪製在quartz2d CGPoint currentPoint = CGPointMake(rascalImage.center.x, rascalImage.center.y); currentPoint.y += 10; UIGraphicsBeginImageContext(self.view.frame.size); [drawingV

    3熱度

    3回答

    我有一個代碼可以擦除蒙版的動畫片段。 (學分here) 我想知道如何檢查整個動畫片段是否被刪除。 所以我想我不得不檢查BitmapData是否爲空,但我可能是非常錯誤的! 如何檢查動畫片的每個像素是否已被擦除? 當然我下面的例子是錯誤的,但我認爲它應該是這樣的。 if (erasableBitmapData = empty) { trace("empty") }

    2熱度

    2回答

    使用brush_mc,您可以將其塗抹在遮罩上,使畫筆中的像素變爲透明。 因此,它視覺上擦除蒙版,並出現蒙面影片剪輯。 我想跟蹤,如果面具完全變成透明。 是否有可能檢查如果沒有bitmapdata掩碼是完全透明的? // this creates a mask that hides the movieclip on top var mask_mc:MovieClip = new MovieClip

    0熱度

    1回答

    我有下面的代碼,我想消除我創建初始值爲10的元素。我在設置迭代器和擦除它時遇到問題。它是如何完成的? #include <iostream> #include <boost/unordered_map.hpp> using namespace std; int main() { typedef boost::unordered_map<int, boost::unordere

    1熱度

    3回答

    我想畫圈出現每一秒,我能夠這樣做,但我如何使舊形狀消失? public void paint(Graphics g) { try { while (true) { Shape circle = new Ellipse2D.Double(500*Math.random(),500*Math.random(), 50.0f, 50.0f); Graphics

    4熱度

    2回答

    參見下面的程序: #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> main(void){ printf("Array concatenateor\n-------------------------\n"); //declarations char

    0熱度

    3回答

    我在清除集合中的元素時遇到了麻煩。我得到BUILD FAILED從: n2Ar.erase(it); n3Ar.erase(it); 其中it從find()功能接收到的指針:例如it = n2Ar.find(*i); 該計劃的整體上市: #include <stdio.h> #include <iostream> #include <vector> #include <set> #i

    5熱度

    3回答

    我有以下代碼: set<Key> test; test.insert(key1); test.insert(key2); iter1 = test.find(key1); iter2 = test.find(key2); test.erase(iter1); 我的問題是,如果KEY1被刪除了,現在我可以用iter2指鍵2測試? 感謝

    2熱度

    2回答

    讓假設我有包括3個3 dataframes命名1和4這樣的列表: 1 3 4 1 A c(2, 1, 3, 1, 2) c(1, 1, 2) c(1, 1) 2 B c(1, 1, 1, 3, 2) c(2, 1, 2) c(2, 1) 的dataframes具有所有相同的列(A和B),但不同你看到的行數。如何清除列B中所有數據幀的值爲< 2的行? 我與任何lapply嘗試: